diff options
Diffstat (limited to 'Lib/test/test_string.py')
-rw-r--r-- | Lib/test/test_string.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 6e241ac..3480459 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -270,6 +270,12 @@ class TestTemplate(unittest.TestCase): raises(ValueError, s.substitute, dict(who='tim')) s = Template('$who likes $100') raises(ValueError, s.substitute, dict(who='tim')) + # Template.idpattern should match to only ASCII characters. + # https://bugs.python.org/issue31672 + s = Template("$who likes $\u0131") # (DOTLESS I) + raises(ValueError, s.substitute, dict(who='tim')) + s = Template("$who likes $\u0130") # (LATIN CAPITAL LETTER I WITH DOT ABOVE) + raises(ValueError, s.substitute, dict(who='tim')) def test_idpattern_override(self): class PathPattern(Template): |