Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jun 18, 2020
1 parent 6fb294d commit 851553d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions glean-core/python/tests/metrics/test_labeled.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ def test_other_label_without_predefined_labels(ping_schema_url):
)

for i in range(21):
labeled_counter_metric["label_{i}".format(i)].add(1)
labeled_counter_metric[f"label_{i}"].add(1)

labeled_counter_metric["label_0"].add(1)

assert 2 == labeled_counter_metric["label_0"].test_get_value()
for i in range(1, 16):
assert 1 == labeled_counter_metric["label_{}".format(i)].test_get_value()
assert 1 == labeled_counter_metric[f"label_{i}"].test_get_value()
assert 5 == labeled_counter_metric["__other__"].test_get_value()

json_content = Glean.test_collect(_builtins.pings.metrics)
Expand All @@ -219,7 +219,7 @@ def test_other_label_without_predefined_labels_before_glean_init():
Dispatcher.set_task_queueing(True)

for i in range(21):
labeled_counter_metric["label_{}".format(i)].add(1)
labeled_counter_metric[f"label_{i}"].add(1)
labeled_counter_metric["label_0"].add(1)

Glean.initialize(
Expand All @@ -230,7 +230,7 @@ def test_other_label_without_predefined_labels_before_glean_init():

assert 2 == labeled_counter_metric["label_0"].test_get_value()
for i in range(1, 16):
assert 1 == labeled_counter_metric["label_{}".format(i)].test_get_value()
assert 1 == labeled_counter_metric[f"label_{i}"].test_get_value()
assert 5 == labeled_counter_metric["__other__"].test_get_value()


Expand Down

0 comments on commit 851553d

Please sign in to comment.