summaryrefslogtreecommitdiff
path: root/Lib/test/test_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_list.py')
-rw-r--r--Lib/test/test_list.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py
index 48c36913c0..def4badbf5 100644
--- a/Lib/test/test_list.py
+++ b/Lib/test/test_list.py
@@ -42,9 +42,8 @@ class ListTest(list_tests.CommonTest):
self.assertEqual(x, [])
def test_keyword_args(self):
- with self.assertWarns(DeprecationWarning):
- self.assertEqual(list(sequence=(x for x in range(10) if x % 2)),
- [1, 3, 5, 7, 9])
+ with self.assertRaisesRegex(TypeError, 'keyword argument'):
+ list(sequence=[])
def test_truth(self):
super().test_truth()