File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,19 @@ def test_escaping(self):
172
172
metric_family .add_metric (["b\\ a\\ z" ], 2 )
173
173
self .assertEqual ([metric_family ], list (families ))
174
174
175
+ def test_timestamps_discarded (self ):
176
+ families = text_string_to_metric_families ("""# TYPE a counter
177
+ # HELP a help
178
+ a{foo="bar"} 1\t 000
179
+ # TYPE b counter
180
+ # HELP b help
181
+ b 2 1234567890
182
+ """ )
183
+ a = CounterMetricFamily ("a" , "help" , labels = ["foo" ])
184
+ a .add_metric (["bar" ], 1 )
185
+ b = CounterMetricFamily ("b" , "help" , value = 2 )
186
+ self .assertEqual ([a , b ], list (families ))
187
+
175
188
@unittest .skipIf (sys .version_info < (2 , 7 ), "Test requires Python 2.7+." )
176
189
def test_roundtrip (self ):
177
190
text = """# HELP go_gc_duration_seconds A summary of the GC invocation durations.
You can’t perform that action at this time.
0 commit comments