Skip to content

Commit e7f180b

Browse files
committed
Add 'test.support' fixture for C0 control characters
1 parent 21ed1e2 commit e7f180b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/support/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3303,3 +3303,10 @@ def linked_to_musl():
33033303
return _linked_to_musl
33043304
_linked_to_musl = tuple(map(int, version.split('.')))
33053305
return _linked_to_musl
3306+
3307+
3308+
def control_characters_c0() -> list[str]:
3309+
"""Returns a list of C0 control characters as strings.
3310+
C0 control characters defined as the byte range 0x00-0x1F, and 0x7F.
3311+
"""
3312+
return [chr(c) for c in range(0x00, 0x20)] + ["\x7F"]

0 commit comments

Comments
 (0)