summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 3032f79..4b582de 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -313,6 +313,19 @@ class UnicodeTest(
self.assertRaises(TypeError, "abc".isnumeric, 42)
+ def test_isidentifier(self):
+ self.assertTrue("a".isidentifier())
+ self.assertTrue("Z".isidentifier())
+ self.assertTrue("_".isidentifier())
+ self.assertTrue("b0".isidentifier())
+ self.assertTrue("bc".isidentifier())
+ self.assertTrue("b_".isidentifier())
+ self.assertTrue("µ".isidentifier())
+
+ self.assertFalse(" ".isidentifier())
+ self.assertFalse("[".isidentifier())
+ self.assertFalse("©".isidentifier())
+
def test_contains(self):
# Testing Unicode contains method
self.assert_('a' in 'abdb')