Beispiel #1
0
 def test_all_ctrl_chars(self):
     """ Test that most (but not all) control characters are removed """
     # input = bytes(range(0x20))
     input = b'\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'  # For python 2 compatibility
     eq_(b"\t\n\v\f\r", clean_ctrl_chars(input))
Beispiel #2
0
 def test_all_ctrl_chars(self):
     """ Test that most (but not all) control characters are removed """
     # input = bytes(range(0x20))
     input = b'\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' # For python 2 compatibility
     eq_(b"\t\n\v\f\r", clean_ctrl_chars(input))
Beispiel #3
0
 def test_clean_null(self):
     eq_(b"", clean_ctrl_chars(b"\x00"))
Beispiel #4
0
 def test_clean_null(self):
     eq_(b"", clean_ctrl_chars(b"\x00"))