Skip to content

Commit

Permalink
ajust unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Monteiro Jácome <[email protected]>
  • Loading branch information
engFelipeMonteiro committed Apr 13, 2022
1 parent 0505d8d commit 62b91f9
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions tests/test_exposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,33 +212,33 @@ def test_gauge_pandas(self):
self.assertEqual(
b'# HELP report_pandas metric description\n'
b'# TYPE report_pandas gauge\n'
b'report_pandas(a=1.1 ,b=5.1 ) 1.0 \n'
b'report_pandas(a=2.2 ,b=6.2 ) 2.0 \n'
b'report_pandas(a=3.3 ,b=7.3 ) 3.0 \n'
b'report_pandas(a=4.4 ,b=8.4 ) 4.0 \n'
b'report_pandas(a="1.1" ,b="5.1" ) 1.0 \n'
b'report_pandas(a="2.2" ,b="6.2" ) 2.0 \n'
b'report_pandas(a="3.3" ,b="7.3" ) 3.0 \n'
b'report_pandas(a="4.4" ,b="8.4" ) 4.0 \n'
b'# HELP report_panda2s metric description2\n'
b'# TYPE report_panda2s gauge\n'
b'report_panda2s(c=1.1 ,d=5.1 ) 5.0 \n'
b'report_panda2s(c=2.2 ,d=6.2 ) 6.0 \n'
b'report_panda2s(c=3.3 ,d=7.3 ) 7.0 \n'
b'report_panda2s(c=4.4 ,d=8.4 ) 8.0 \n',
b'report_panda2s(c="1.1" ,d="5.1" ) 5.0 \n'
b'report_panda2s(c="2.2" ,d="6.2" ) 6.0 \n'
b'report_panda2s(c="3.3" ,d="7.3" ) 7.0 \n'
b'report_panda2s(c="4.4" ,d="8.4" ) 8.0 \n',
generate_latest(self.registry)
)

g2.set_metric(df2)
self.assertEqual(
b'# HELP report_pandas metric description\n'
b'# TYPE report_pandas gauge\n'
b'report_pandas(a=1.1 ,b=5.1 ) 1.0 \n'
b'report_pandas(a=2.2 ,b=6.2 ) 2.0 \n'
b'report_pandas(a=3.3 ,b=7.3 ) 3.0 \n'
b'report_pandas(a=4.4 ,b=8.4 ) 4.0 \n'
b'report_pandas(a="1.1" ,b="5.1" ) 1.0 \n'
b'report_pandas(a="2.2" ,b="6.2" ) 2.0 \n'
b'report_pandas(a="3.3" ,b="7.3" ) 3.0 \n'
b'report_pandas(a="4.4" ,b="8.4" ) 4.0 \n'
b'# HELP report_panda2s metric description2\n'
b'# TYPE report_panda2s gauge\n'
b'report_panda2s(c=1.1 ,d=5.1 ) 5 \n'
b'report_panda2s(c=2.2 ,d=6.2 ) 6 \n'
b'report_panda2s(c=3.3 ,d=7.3 ) 7 \n'
b'report_panda2s(c=4.4 ,d=8.4 ) 8 \n',
b'report_panda2s(c="1.1" ,d="5.1" ) 5 \n'
b'report_panda2s(c="2.2" ,d="6.2" ) 6 \n'
b'report_panda2s(c="3.3" ,d="7.3" ) 7 \n'
b'report_panda2s(c="4.4" ,d="8.4" ) 8 \n',
generate_latest(self.registry)
)

Expand All @@ -261,16 +261,16 @@ def test_gauge_pandas_columns(self):
self.assertEqual(
b'# HELP report_pandas metric description\n'
b'# TYPE report_pandas gauge\n'
b'report_pandas(a=1.1 ) 1.0 \n'
b'report_pandas(a=2.2 ) 2.0 \n'
b'report_pandas(a=3.3 ) 3.0 \n'
b'report_pandas(a=4.4 ) 4.0 \n'
b'report_pandas(a="1.1" ) 1.0 \n'
b'report_pandas(a="2.2" ) 2.0 \n'
b'report_pandas(a="3.3" ) 3.0 \n'
b'report_pandas(a="4.4" ) 4.0 \n'
b'# HELP report_panda2s metric description2\n'
b'# TYPE report_panda2s gauge\n'
b'report_panda2s(d=5.1 ) 5.0 \n'
b'report_panda2s(d=6.2 ) 6.0 \n'
b'report_panda2s(d=7.3 ) 7.0 \n'
b'report_panda2s(d=8.4 ) 8.0 \n',
b'report_panda2s(d="5.1" ) 5.0 \n'
b'report_panda2s(d="6.2" ) 6.0 \n'
b'report_panda2s(d="7.3" ) 7.0 \n'
b'report_panda2s(d="8.4" ) 8.0 \n',
generate_latest(self.registry)
)

Expand Down

0 comments on commit 62b91f9

Please sign in to comment.