We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d30f0a9 commit 587ae18Copy full SHA for 587ae18
builtin/tests/builtin.py
@@ -20,8 +20,16 @@
20
assert any([]) == False
21
22
doc="ascii"
23
+class B():
24
+ def __repr__(self):
25
+ return "repr method"
26
+
27
assert ascii('hello world') == "'hello world'"
28
assert ascii('안녕 세상') == "'\\uc548\\ub155 \\uc138\\uc0c1'"
29
+assert ascii('\\') == "'\\\\'"
30
+assert ascii('\t\r\n') == "'\\t\\r\\n'"
31
+assert ascii("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F") == "'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
32
+assert ascii(B()) == 'repr method'
33
34
doc="chr"
35
assert chr(65) == "A"
0 commit comments