MCPcopy Index your code
hub / github.com/python/cpython / testRound

Method testRound

Lib/test/test_fractions.py:754–759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

752 self.assertIs(bool(r), False)
753
754 def testRound(self):
755 self.assertTypedEquals(F(-200), round(F(-150), -2))
756 self.assertTypedEquals(F(-200), round(F(-250), -2))
757 self.assertTypedEquals(F(30), round(F(26), -1))
758 self.assertTypedEquals(F(-2, 10), round(F(-15, 100), 1))
759 self.assertTypedEquals(F(-2, 10), round(F(-25, 100), 1))
760
761 def testArithmetic(self):
762 self.assertEqual(F(1, 2), F(1, 10) + F(2, 5))

Callers

nothing calls this directly

Calls 2

assertTypedEqualsMethod · 0.95
FClass · 0.70

Tested by

no test coverage detected