@@ -67,14 +67,10 @@ def testAssertMetricEquals(self):
6767 # First we test that a scalar metric can be tested.
6868 self .test_case .assertMetricEquals (42 , "some_gauge" , registry = self .registry )
6969 assert self .test_case .passes is True
70- self .test_case .assertMetricEquals (43 , "some_gauge" , registry = self .registry )
71- assert self .test_case .passes is False
72- self .test_case .passes = True
70+ self .test_case .assertMetricNotEquals (43 , "some_gauge" , registry = self .registry )
7371
7472 # Here we test that assertMetricEquals fails on nonexistent gauges.
75- self .test_case .assertMetricEquals (42 , "some_nonexistent_gauge" , registry = self .registry )
76- assert not self .test_case .passes
77- self .test_case .passes = True
73+ self .test_case .assertMetricNotEquals (42 , "some_nonexistent_gauge" , registry = self .registry )
7874
7975 # Here we test that labelled metrics can be tested.
8076 self .test_case .assertMetricEquals (
@@ -85,15 +81,13 @@ def testAssertMetricEquals(self):
8581 labelblue = "indigo" ,
8682 )
8783 assert self .test_case .passes is True
88- self .test_case .assertMetricEquals (
84+ self .test_case .assertMetricNotEquals (
8985 1 ,
9086 "some_labelled_gauge" ,
9187 registry = self .registry ,
9288 labelred = "tomato" ,
9389 labelblue = "sky" ,
9490 )
95- assert self .test_case .passes is False
96- self .test_case .passes = True
9791
9892 def testRegistrySaving (self ):
9993 """Tests saveRegistry and frozen registries operations."""
0 commit comments