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

Method test_int

Lib/test/test_statistics.py:950–956  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

948 self.assertIs(type(x), type(y))
949
950 def test_int(self):
951 # Test conversions to int.
952 x = statistics._convert(Fraction(71), int)
953 self.check_exact_equal(x, 71)
954 class MyInt(int): pass
955 x = statistics._convert(Fraction(17), MyInt)
956 self.check_exact_equal(x, MyInt(17))
957
958 def test_fraction(self):
959 # Test conversions to Fraction.

Callers

nothing calls this directly

Calls 3

check_exact_equalMethod · 0.95
FractionClass · 0.90
MyIntClass · 0.70

Tested by

no test coverage detected