mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -27,9 +27,8 @@ class TupleTest(seq_tests.CommonTest):
|
|||
(1, 3, 5, 7, 9))
|
||||
|
||||
def test_keyword_args(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.assertEqual(tuple(sequence=(x for x in range(10) if x % 2)),
|
||||
(1, 3, 5, 7, 9))
|
||||
with self.assertRaisesRegex(TypeError, 'keyword argument'):
|
||||
tuple(sequence=())
|
||||
|
||||
def test_truth(self):
|
||||
super().test_truth()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue