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

Method check

Lib/test/test_fractions.py:590–594  ·  view source on GitHub ↗
(arg, numerator, denominator)

Source from the content-addressed store, hash-verified

588
589 def testFromNumber(self, cls=F):
590 def check(arg, numerator, denominator):
591 f = cls.from_number(arg)
592 self.assertIs(type(f), cls)
593 self.assertEqual(f.numerator, numerator)
594 self.assertEqual(f.denominator, denominator)
595
596 check(10, 10, 1)
597 check(2.5, 5, 2)

Callers

nothing calls this directly

Calls 3

from_numberMethod · 0.45
assertIsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected