Home
last modified time | relevance | path

Searched refs:__round__ (Results 1 - 12 of 12) sorted by relevance

/third_party/python/Lib/
H A Dnumbers.py189 def __round__(self, ndigits=None): member in Real
H A Dfractions.py620 def __round__(self, ndigits=None): member in Fraction
H A Dtyping.py2830 """An ABC with one abstract method __round__ that is covariant in its return type."""
2835 def __round__(self, ndigits: int = 0) -> T_co: member in SupportsRound
H A D_pydecimal.py1840 def __round__(self, n=None): member in Decimal
/third_party/python/Lib/unittest/test/testmock/
H A Dtestmagicmethods.py284 self.assertEqual(round(mock), mock.__round__())
310 self.assertEqual(round(mock), mock.__round__())
/third_party/python/Lib/test/
H A Dtest_decimal.py4594 self.assertEqual(str(Decimal("9.99").__round__()), "10")
4595 self.assertEqual(str(Decimal("9.99e-5").__round__()), "0")
4596 self.assertEqual(str(Decimal("1.23456789").__round__(5)), "1.23457")
4597 self.assertEqual(str(Decimal("1.2345").__round__(10)), "1.2345000000")
4598 self.assertEqual(str(Decimal("1.2345").__round__(-10)), "0E+10")
4600 self.assertRaises(TypeError, Decimal("1.23").__round__, "5")
4601 self.assertRaises(TypeError, Decimal("1.23").__round__, 5, 8)
5164 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5166 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5168 self.assertRaises(InvalidOperation, Decimal("1").__round__,
[all...]
H A Dtest_builtin.py1545 def __round__(self): member in BuiltinTest.test_round.TestRound
1557 t.__round__ = lambda *args: args
/third_party/python/Include/internal/
H A Dpycore_global_strings.h182 STRUCT_FOR_ID(__round__)
H A Dpycore_runtime_init.h805 INIT_ID(__round__), \
/third_party/python/Modules/_decimal/tests/
H A Ddeccheck.py100 'special': ('__format__', '__reduce_ex__', '__round__', 'from_float',
155 BinaryRestricted = ['__round__']
559 def __round__(self, t): member in SkipHandler
560 """Exception: Decimal('1').__round__(-100000000000000000000000000)
1068 """Iterate the __round__ method through many test cases."""
1261 do_single('__round__', lambda: test_method('__round__', testspecs, test_round))
/third_party/protobuf/python/google/protobuf/internal/
H A Dtest_util.py864 def __round__(self): member in NonStandardInteger
/third_party/python/Python/
H A Dbltinmodule.c2325 round = _PyObject_LookupSpecial(number, &_Py_ID(__round__)); in builtin_round_impl()
2329 "type %.100s doesn't define __round__ method", in builtin_round_impl()

Completed in 31 milliseconds