mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add chr() test snippets
This commit is contained in:
1 parent
ea535856b4
commit
c656c5cc72
1 file changed
+8
@@ -0,0 +1,8 @@
|
||||
from testutils import assert_raises
|
||||
|
||||
assert "a" == chr(97)
|
||||
assert "é" == chr(233)
|
||||
assert "🤡" == chr(129313)
|
||||
|
||||
assert_raises(TypeError, lambda: chr(), "chr() takes exactly one argument (0 given)")
|
||||
assert_raises(ValueError, lambda: chr(0x110005), "ValueError: chr() arg not in range(0x110000)")
|
||||
Reference in new issue
Block a user