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

Method test_equal

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

Source from the content-addressed store, hash-verified

73print("Example 3")
74class MyTestCase2(unittest.TestCase):
75 def test_equal(self):
76 n = 5
77 d = 3
78 self.assertAlmostEqual(1.667, n / d, places=2) # Changed
79
80suite = unittest.defaultTestLoader.loadTestsFromTestCase(MyTestCase2)
81unittest.TextTestRunner(stream=STDOUT).run(suite)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected