Skip to content

Commit a3be3e9

Browse files
committed
add a test for unicodedata.category
1 parent ec5d5ec commit a3be3e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_unicodedata.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,12 @@ def test_normalize():
5252
assert_raises(TypeError, unicodedata.normalize)
5353
assert_raises(ValueError, unicodedata.normalize, 'unknown', 'xx')
5454
assert unicodedata.normalize('NFKC', '') == ''
55+
56+
57+
def test_category():
58+
import unicodedata
59+
assert unicodedata.category('\uFFFE') == 'Cn'
60+
assert unicodedata.category('a') == 'Ll'
61+
assert unicodedata.category('A') == 'Lu'
62+
assert_raises(TypeError, unicodedata.category)
63+
assert_raises(TypeError, unicodedata.category, 'xx')

0 commit comments

Comments
 (0)