commit | 79ba471488b936abda5ba5234b1ea90cbc94cae6 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sat Oct 07 22:59:35 2017 +0300 |
committer | GitHub <noreply@github.com> | Sat Oct 07 22:59:35 2017 +0300 |
tree | bb050e9c72817d1acb54ddc4ae9fc186770aa196 | |
parent | 28f713601d3ec80820e842dcb25a234093f1ff18 [diff] |
bpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 966ef6d..28133a3 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py
@@ -1069,6 +1069,8 @@ with self.assertRaises(TypeError): types.SimpleNamespace(1, 2, 3) + with self.assertRaises(TypeError): + types.SimpleNamespace(**{1: 2}) self.assertEqual(len(ns1.__dict__), 0) self.assertEqual(vars(ns1), {})