MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / test_equal

Method test_equal

example_code/item_113.py:91–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89print("Example 5")
90class MyTestCase3(unittest.TestCase):
91 def test_equal(self):
92 a = 1e24 / 1.1e16
93 b = 1e24 / 1.101e16
94 self.assertAlmostEqual(90.9e6, a, delta=0.1e6)
95 self.assertAlmostEqual(90.9e6, b, delta=0.1e6)
96suite = unittest.defaultTestLoader.loadTestsFromTestCase(MyTestCase3)
97unittest.TextTestRunner(stream=STDOUT).run(suite)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected