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.
This commit is contained in:
Serhiy Storchaka 2017-03-06 00:53:39 +02:00 committed by GitHub
parent d31b28e16a
commit 58d23e6806
12 changed files with 65 additions and 2 deletions

View file

@ -208,6 +208,10 @@ class GeneralFloatCases(unittest.TestCase):
with self.assertWarns(DeprecationWarning):
self.assertIs(type(FloatSubclass(F())), FloatSubclass)
def test_keyword_args(self):
with self.assertWarns(DeprecationWarning):
self.assertEqual(float(x='3.14'), 3.14)
def test_is_integer(self):
self.assertFalse((1.1).is_integer())
self.assertTrue((1.).is_integer())