mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-07 10:40:16 +00:00
* 通过引发py_call错误覆盖相关调用者的ok==false分支 * Revert "通过引发py_call错误覆盖相关调用者的ok==false分支" This reverts commit 36dc0b5d81a02a83dfdeca2d4d6d265f5f793b4b. * add test * rename test files * fix bugs * fix bugs
18 lines
409 B
Python
18 lines
409 B
Python
from unicodedata import east_asian_width
|
||
|
||
# full width
|
||
assert east_asian_width("A") == "F"
|
||
# half width
|
||
assert east_asian_width("サ") == "H"
|
||
# narrow
|
||
assert east_asian_width("a") == "Na"
|
||
# wide
|
||
assert east_asian_width("测") == "W"
|
||
assert east_asian_width("🥕") == "W"
|
||
assert east_asian_width("。") == "W"
|
||
# ambiguous
|
||
assert east_asian_width("°") == "A"
|
||
# neutral
|
||
assert east_asian_width("\n") == "N"
|
||
|