diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-06 15:01:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-06 15:01:06 (GMT) |
commit | 2e5642422f6234fd8d0c082142b27340e588f96e (patch) | |
tree | 8279099d6fc0b034aaeb0be40a1d30d9246afc81 /Lib/test/test_int.py | |
parent | b76ad5121e2cfa89d6476d700cbcb65b7ffc39ac (diff) | |
download | cpython-2e5642422f6234fd8d0c082142b27340e588f96e.zip cpython-2e5642422f6234fd8d0c082142b27340e588f96e.tar.gz cpython-2e5642422f6234fd8d0c082142b27340e588f96e.tar.bz2 |
bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). (#518)
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r-- | Lib/test/test_int.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index db96967..854117e 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -246,11 +246,11 @@ class IntTestCases(unittest.TestCase): def test_keyword_args(self): # Test invoking int() using keyword arguments. - with self.assertWarns(DeprecationWarning): - self.assertEqual(int(x=1.2), 1) self.assertEqual(int('100', base=2), 4) - with self.assertWarns(DeprecationWarning): - self.assertEqual(int(x='100', base=2), 4) + with self.assertRaisesRegex(TypeError, 'keyword argument'): + int(x=1.2) + with self.assertRaisesRegex(TypeError, 'keyword argument'): + int(x='100', base=2) self.assertRaises(TypeError, int, base=10) self.assertRaises(TypeError, int, base=0) |