diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-06 00:53:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-06 00:53:39 +0200 |
commit | 58d23e68068996c76cac78887ec67dee68cdbc72 (patch) | |
tree | 08c445d38282d71be01f109d459d7448364aec0e /Lib/test/test_int.py | |
parent | d31b28e16a2387d0251df948ef5d1b33d4357652 (diff) | |
download | cpython-git-58d23e68068996c76cac78887ec67dee68cdbc72.tar.gz |
bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486)
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r-- | Lib/test/test_int.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index 14bbd6192a..db969672e4 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -246,9 +246,11 @@ class IntTestCases(unittest.TestCase): def test_keyword_args(self): # Test invoking int() using keyword arguments. - self.assertEqual(int(x=1.2), 1) + with self.assertWarns(DeprecationWarning): + self.assertEqual(int(x=1.2), 1) self.assertEqual(int('100', base=2), 4) - self.assertEqual(int(x='100', base=2), 4) + with self.assertWarns(DeprecationWarning): + self.assertEqual(int(x='100', base=2), 4) self.assertRaises(TypeError, int, base=10) self.assertRaises(TypeError, int, base=0) |