mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). (#518)
This commit is contained in:
parent
b76ad5121e
commit
2e5642422f
12 changed files with 31 additions and 61 deletions
|
|
@ -209,8 +209,8 @@ class GeneralFloatCases(unittest.TestCase):
|
|||
self.assertIs(type(FloatSubclass(F())), FloatSubclass)
|
||||
|
||||
def test_keyword_args(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.assertEqual(float(x='3.14'), 3.14)
|
||||
with self.assertRaisesRegex(TypeError, 'keyword argument'):
|
||||
float(x='3.14')
|
||||
|
||||
def test_is_integer(self):
|
||||
self.assertFalse((1.1).is_integer())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue