diff options
| author | Raymond Hettinger <python@rcn.com> | 2007-05-21 16:40:10 (GMT) |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2007-05-21 16:40:10 (GMT) |
| commit | 767debb6aa5729e919da309ecc770f8b2d94beba (patch) | |
| tree | 668f74f7f1ce5f7fc23b9d8fbefc7420c35f1753 /Lib/test/test_collections.py | |
| parent | 0d6a8ccfb7b602c97fd3dd2a57eaa8138c811186 (diff) | |
| download | cpython-767debb6aa5729e919da309ecc770f8b2d94beba.zip cpython-767debb6aa5729e919da309ecc770f8b2d94beba.tar.gz cpython-767debb6aa5729e919da309ecc770f8b2d94beba.tar.bz2 | |
Allow all alphanumeric and underscores in type and field names.
Diffstat (limited to 'Lib/test/test_collections.py')
| -rw-r--r-- | Lib/test/test_collections.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index b3f460e..f5dad7d 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -11,6 +11,9 @@ class TestNamedTuple(unittest.TestCase): self.assertEqual(Point.__slots__, ()) self.assertEqual(Point.__module__, __name__) self.assertEqual(Point.__getitem__, tuple.__getitem__) + self.assertRaises(ValueError, NamedTuple, 'abc%', 'def ghi') + self.assertRaises(ValueError, NamedTuple, 'abc', 'def g%hi') + NamedTuple('Point0', 'x1 y2') # Verify that numbers are allowed in names def test_instance(self): Point = NamedTuple('Point', 'x y') |
