Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
python39 /
lib64 /
python3.9 /
test /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
audiodata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
capath
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
cjkencodings
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
data
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
decimaltestdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
dtracedata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
eintrdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
encoded_modules
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
imghdrdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
libregrtest
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
sndhdrdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
subprocessdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
support
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_asyncio
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_email
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_import
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_importlib
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_json
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_peg_generator
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_tools
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_warnings
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_zoneinfo
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
tracedmodules
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
xmltestdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
ziptestdata
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
Sine-1000Hz-300ms.aif
60.25
KB
-rw-r--r--
2025-06-03 22:17
__init__.py
47
B
-rw-r--r--
2025-06-03 22:17
__main__.py
41
B
-rw-r--r--
2025-06-03 22:17
_test_multiprocessing.py
187.16
KB
-rw-r--r--
2025-06-03 22:17
_typed_dict_helper.py
494
B
-rw-r--r--
2025-06-03 22:17
allsans.pem
9.87
KB
-rw-r--r--
2025-06-03 22:17
ann_module.py
1.08
KB
-rw-r--r--
2025-06-03 22:17
ann_module2.py
519
B
-rw-r--r--
2025-06-03 22:17
ann_module3.py
448
B
-rw-r--r--
2025-06-03 22:17
ann_module5.py
202
B
-rw-r--r--
2025-06-03 22:17
ann_module6.py
138
B
-rw-r--r--
2025-06-03 22:17
ann_module7.py
295
B
-rw-r--r--
2025-06-03 22:17
audiotest.au
27.48
KB
-rw-r--r--
2025-06-03 22:17
audiotests.py
12.1
KB
-rw-r--r--
2025-06-03 22:17
audit-tests.py
9.89
KB
-rw-r--r--
2025-06-03 22:17
autotest.py
209
B
-rw-r--r--
2025-06-03 22:17
bad_coding.py
24
B
-rw-r--r--
2025-06-03 22:17
bad_coding2.py
30
B
-rw-r--r--
2025-06-03 22:17
bad_getattr.py
61
B
-rw-r--r--
2025-06-03 22:17
bad_getattr2.py
77
B
-rw-r--r--
2025-06-03 22:17
bad_getattr3.py
139
B
-rw-r--r--
2025-06-03 22:17
badcert.pem
1.88
KB
-rw-r--r--
2025-06-03 22:17
badkey.pem
2.11
KB
-rw-r--r--
2025-06-03 22:17
badsyntax_3131.py
32
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future10.py
95
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future3.py
172
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future4.py
153
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future5.py
184
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future6.py
161
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future7.py
196
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future8.py
122
B
-rw-r--r--
2025-06-03 22:17
badsyntax_future9.py
142
B
-rw-r--r--
2025-06-03 22:17
badsyntax_pep3120.py
14
B
-rw-r--r--
2025-06-03 22:17
bisect_cmd.py
5.23
KB
-rwxr-xr-x
2025-06-03 22:17
cfgparser.1
67
B
-rw-r--r--
2025-06-03 22:17
cfgparser.2
19.02
KB
-rw-r--r--
2025-06-03 22:17
cfgparser.3
1.55
KB
-rw-r--r--
2025-06-03 22:17
clinic.test
94.64
KB
-rw-r--r--
2025-06-03 22:17
cmath_testcases.txt
141.05
KB
-rw-r--r--
2025-06-03 22:17
coding20731.py
22
B
-rw-r--r--
2025-06-03 22:17
curses_tests.py
1.22
KB
-rwxr-xr-x
2025-06-03 22:17
dataclass_module_1.py
837
B
-rw-r--r--
2025-06-03 22:17
dataclass_module_1_str.py
835
B
-rw-r--r--
2025-06-03 22:17
dataclass_module_2.py
756
B
-rw-r--r--
2025-06-03 22:17
dataclass_module_2_str.py
754
B
-rw-r--r--
2025-06-03 22:17
dataclass_textanno.py
126
B
-rw-r--r--
2025-06-03 22:17
datetimetester.py
245.6
KB
-rw-r--r--
2025-06-03 22:17
dis_module.py
76
B
-rw-r--r--
2025-06-03 22:17
doctest_aliases.py
240
B
-rw-r--r--
2025-06-03 22:17
double_const.py
1.18
KB
-rw-r--r--
2025-06-03 22:17
empty.vbs
70
B
-rw-r--r--
2025-06-03 22:17
exception_hierarchy.txt
1.78
KB
-rw-r--r--
2025-06-03 22:17
ffdh3072.pem
2.16
KB
-rw-r--r--
2025-06-03 22:17
final_a.py
411
B
-rw-r--r--
2025-06-03 22:17
final_b.py
411
B
-rw-r--r--
2025-06-03 22:17
floating_points.txt
15.92
KB
-rw-r--r--
2025-06-03 22:17
fork_wait.py
2.17
KB
-rw-r--r--
2025-06-03 22:17
formatfloat_testcases.txt
7.45
KB
-rw-r--r--
2025-06-03 22:17
future_test1.py
229
B
-rw-r--r--
2025-06-03 22:17
future_test2.py
149
B
-rw-r--r--
2025-06-03 22:17
gdb_sample.py
153
B
-rw-r--r--
2025-06-03 22:17
good_getattr.py
198
B
-rw-r--r--
2025-06-03 22:17
idnsans.pem
9.71
KB
-rw-r--r--
2025-06-03 22:17
ieee754.txt
3.21
KB
-rw-r--r--
2025-06-03 22:17
imp_dummy.py
63
B
-rw-r--r--
2025-06-03 22:17
inspect_fodder.py
1.88
KB
-rw-r--r--
2025-06-03 22:17
inspect_fodder2.py
3.38
KB
-rw-r--r--
2025-06-03 22:17
keycert.passwd.pem
4.13
KB
-rw-r--r--
2025-06-03 22:17
keycert.pem
3.96
KB
-rw-r--r--
2025-06-03 22:17
keycert2.pem
3.98
KB
-rw-r--r--
2025-06-03 22:17
keycert3.pem
9.23
KB
-rw-r--r--
2025-06-03 22:17
keycert4.pem
9.24
KB
-rw-r--r--
2025-06-03 22:17
keycertecc.pem
5.5
KB
-rw-r--r--
2025-06-03 22:17
list_tests.py
17.05
KB
-rw-r--r--
2025-06-03 22:17
lock_tests.py
30.08
KB
-rw-r--r--
2025-06-03 22:17
mailcap.txt
1.24
KB
-rw-r--r--
2025-06-03 22:17
make_ssl_certs.py
9.25
KB
-rw-r--r--
2025-06-03 22:17
mapping_tests.py
21.83
KB
-rw-r--r--
2025-06-03 22:17
math_testcases.txt
23.19
KB
-rw-r--r--
2025-06-03 22:17
memory_watchdog.py
859
B
-rw-r--r--
2025-06-03 22:17
mime.types
47.37
KB
-rw-r--r--
2025-06-03 22:17
mock_socket.py
3.7
KB
-rw-r--r--
2025-06-03 22:17
mod_generics_cache.py
1.13
KB
-rw-r--r--
2025-06-03 22:17
mp_fork_bomb.py
448
B
-rw-r--r--
2025-06-03 22:17
mp_preload.py
351
B
-rw-r--r--
2025-06-03 22:17
multibytecodec_support.py
14.17
KB
-rw-r--r--
2025-06-03 22:17
nokia.pem
1.88
KB
-rw-r--r--
2025-06-03 22:17
nosan.pem
7.54
KB
-rw-r--r--
2025-06-03 22:17
nullbytecert.pem
5.31
KB
-rw-r--r--
2025-06-03 22:17
nullcert.pem
0
B
-rw-r--r--
2025-06-03 22:17
pickletester.py
136.56
KB
-rw-r--r--
2025-06-03 22:17
profilee.py
2.97
KB
-rw-r--r--
2025-06-03 22:17
pstats.pck
65.05
KB
-rw-r--r--
2025-06-03 22:17
pycacert.pem
5.53
KB
-rw-r--r--
2025-06-03 22:17
pycakey.pem
2.43
KB
-rw-r--r--
2025-06-03 22:17
pyclbr_input.py
648
B
-rw-r--r--
2025-06-03 22:17
pydoc_mod.py
937
B
-rw-r--r--
2025-06-03 22:17
pydocfodder.py
6.18
KB
-rw-r--r--
2025-06-03 22:17
pythoninfo.py
22.21
KB
-rw-r--r--
2025-06-03 22:17
randv2_32.pck
7.34
KB
-rw-r--r--
2025-06-03 22:17
randv2_64.pck
7.19
KB
-rw-r--r--
2025-06-03 22:17
randv3.pck
7.82
KB
-rw-r--r--
2025-06-03 22:17
re_tests.py
25.94
KB
-rwxr-xr-x
2025-06-03 22:17
recursion.tar
516
B
-rw-r--r--
2025-06-03 22:17
regrtest.py
1.28
KB
-rwxr-xr-x
2025-06-03 22:17
relimport.py
27
B
-rw-r--r--
2025-06-03 22:17
reperf.py
538
B
-rw-r--r--
2025-06-03 22:17
revocation.crl
800
B
-rw-r--r--
2025-06-03 22:17
sample_doctest.py
1.02
KB
-rw-r--r--
2025-06-03 22:17
sample_doctest_no_docstrings.py
227
B
-rw-r--r--
2025-06-03 22:17
sample_doctest_no_doctests.py
269
B
-rw-r--r--
2025-06-03 22:17
secp384r1.pem
256
B
-rw-r--r--
2025-06-03 22:17
selfsigned_pythontestdotnet.pem
2.08
KB
-rw-r--r--
2025-06-03 22:17
seq_tests.py
14.87
KB
-rw-r--r--
2025-06-03 22:17
sgml_input.html
8.1
KB
-rw-r--r--
2025-06-03 22:17
signalinterproctester.py
2.74
KB
-rw-r--r--
2025-06-03 22:17
sortperf.py
4.69
KB
-rw-r--r--
2025-06-03 22:17
ssl_cert.pem
1.53
KB
-rw-r--r--
2025-06-03 22:17
ssl_key.passwd.pem
2.59
KB
-rw-r--r--
2025-06-03 22:17
ssl_key.pem
2.43
KB
-rw-r--r--
2025-06-03 22:17
ssl_servers.py
7.11
KB
-rw-r--r--
2025-06-03 22:17
ssltests.py
1.03
KB
-rw-r--r--
2025-06-03 22:17
string_tests.py
66.55
KB
-rw-r--r--
2025-06-03 22:17
talos-2019-0758.pem
1.3
KB
-rw-r--r--
2025-06-03 22:17
test___all__.py
4.5
KB
-rw-r--r--
2025-06-03 22:17
test___future__.py
2.36
KB
-rw-r--r--
2025-06-03 22:17
test__locale.py
7.83
KB
-rw-r--r--
2025-06-03 22:17
test__opcode.py
3.03
KB
-rw-r--r--
2025-06-03 22:17
test__osx_support.py
13.66
KB
-rw-r--r--
2025-06-03 22:17
test__xxsubinterpreters.py
79.01
KB
-rw-r--r--
2025-06-03 22:17
test_abc.py
19.38
KB
-rw-r--r--
2025-06-03 22:17
test_abstract_numbers.py
1.49
KB
-rw-r--r--
2025-06-03 22:17
test_aifc.py
17.7
KB
-rw-r--r--
2025-06-03 22:17
test_argparse.py
180.91
KB
-rw-r--r--
2025-06-03 22:17
test_array.py
51.67
KB
-rw-r--r--
2025-06-03 22:17
test_asdl_parser.py
4.14
KB
-rw-r--r--
2025-06-03 22:17
test_ast.py
98.84
KB
-rw-r--r--
2025-06-03 22:17
test_asyncgen.py
33.58
KB
-rw-r--r--
2025-06-03 22:17
test_asynchat.py
9.16
KB
-rw-r--r--
2025-06-03 22:17
test_asyncore.py
25.84
KB
-rw-r--r--
2025-06-03 22:17
test_atexit.py
5.81
KB
-rw-r--r--
2025-06-03 22:17
test_audioop.py
28.24
KB
-rw-r--r--
2025-06-03 22:17
test_audit.py
4.3
KB
-rw-r--r--
2025-06-03 22:17
test_augassign.py
7.68
KB
-rw-r--r--
2025-06-03 22:17
test_base64.py
29.88
KB
-rw-r--r--
2025-06-03 22:17
test_baseexception.py
6.86
KB
-rw-r--r--
2025-06-03 22:17
test_bdb.py
41.41
KB
-rw-r--r--
2025-06-03 22:17
test_bigaddrspace.py
2.83
KB
-rw-r--r--
2025-06-03 22:17
test_bigmem.py
44.78
KB
-rw-r--r--
2025-06-03 22:17
test_binascii.py
19.24
KB
-rw-r--r--
2025-06-03 22:17
test_binhex.py
1.96
KB
-rw-r--r--
2025-06-03 22:17
test_binop.py
14.14
KB
-rw-r--r--
2025-06-03 22:17
test_bisect.py
13.63
KB
-rw-r--r--
2025-06-03 22:17
test_bool.py
12.44
KB
-rw-r--r--
2025-06-03 22:17
test_buffer.py
160.27
KB
-rw-r--r--
2025-06-03 22:17
test_bufio.py
2.54
KB
-rw-r--r--
2025-06-03 22:17
test_builtin.py
81.01
KB
-rw-r--r--
2025-06-03 22:17
test_bytes.py
74.65
KB
-rw-r--r--
2025-06-03 22:17
test_bz2.py
36.95
KB
-rw-r--r--
2025-06-03 22:17
test_c_locale_coercion.py
18.92
KB
-rw-r--r--
2025-06-03 22:17
test_calendar.py
49.02
KB
-rw-r--r--
2025-06-03 22:17
test_call.py
24.09
KB
-rw-r--r--
2025-06-03 22:17
test_capi.py
36.9
KB
-rw-r--r--
2025-06-03 22:17
test_cgi.py
22.15
KB
-rw-r--r--
2025-06-03 22:17
test_cgitb.py
2.53
KB
-rw-r--r--
2025-06-03 22:17
test_charmapcodec.py
1.68
KB
-rw-r--r--
2025-06-03 22:17
test_check_c_globals.py
749
B
-rw-r--r--
2025-06-03 22:17
test_class.py
17.41
KB
-rw-r--r--
2025-06-03 22:17
test_clinic.py
21.51
KB
-rw-r--r--
2025-06-03 22:17
test_cmath.py
24.07
KB
-rw-r--r--
2025-06-03 22:17
test_cmd.py
6.1
KB
-rw-r--r--
2025-06-03 22:17
test_cmd_line.py
36.55
KB
-rw-r--r--
2025-06-03 22:17
test_cmd_line_script.py
32.47
KB
-rw-r--r--
2025-06-03 22:17
test_code.py
12.47
KB
-rw-r--r--
2025-06-03 22:17
test_code_module.py
5.51
KB
-rw-r--r--
2025-06-03 22:17
test_codeccallbacks.py
49.05
KB
-rw-r--r--
2025-06-03 22:17
test_codecencodings_cn.py
3.86
KB
-rw-r--r--
2025-06-03 22:17
test_codecencodings_hk.py
701
B
-rw-r--r--
2025-06-03 22:17
test_codecencodings_iso2022.py
3.65
KB
-rw-r--r--
2025-06-03 22:17
test_codecencodings_jp.py
4.79
KB
-rw-r--r--
2025-06-03 22:17
test_codecencodings_kr.py
2.96
KB
-rw-r--r--
2025-06-03 22:17
test_codecencodings_tw.py
681
B
-rw-r--r--
2025-06-03 22:17
test_codecmaps_cn.py
746
B
-rw-r--r--
2025-06-03 22:17
test_codecmaps_hk.py
386
B
-rw-r--r--
2025-06-03 22:17
test_codecmaps_jp.py
1.7
KB
-rw-r--r--
2025-06-03 22:17
test_codecmaps_kr.py
1.16
KB
-rw-r--r--
2025-06-03 22:17
test_codecmaps_tw.py
705
B
-rw-r--r--
2025-06-03 22:17
test_codecs.py
133.02
KB
-rw-r--r--
2025-06-03 22:17
test_codeop.py
8.25
KB
-rw-r--r--
2025-06-03 22:17
test_collections.py
90.13
KB
-rw-r--r--
2025-06-03 22:17
test_colorsys.py
3.83
KB
-rw-r--r--
2025-06-03 22:17
test_compare.py
3.74
KB
-rw-r--r--
2025-06-03 22:17
test_compile.py
37.61
KB
-rw-r--r--
2025-06-03 22:17
test_compileall.py
45.53
KB
-rw-r--r--
2025-06-03 22:17
test_complex.py
32.19
KB
-rw-r--r--
2025-06-03 22:17
test_concurrent_futures.py
54.11
KB
-rw-r--r--
2025-06-03 22:17
test_configparser.py
84.93
KB
-rw-r--r--
2025-06-03 22:17
test_contains.py
3.35
KB
-rw-r--r--
2025-06-03 22:17
test_context.py
30.63
KB
-rw-r--r--
2025-06-03 22:17
test_contextlib.py
33.66
KB
-rw-r--r--
2025-06-03 22:17
test_contextlib_async.py
16.19
KB
-rw-r--r--
2025-06-03 22:17
test_copy.py
26
KB
-rw-r--r--
2025-06-03 22:17
test_copyreg.py
4.39
KB
-rw-r--r--
2025-06-03 22:17
test_coroutines.py
62.89
KB
-rw-r--r--
2025-06-03 22:17
test_cprofile.py
6.33
KB
-rw-r--r--
2025-06-03 22:17
test_crashers.py
1.17
KB
-rw-r--r--
2025-06-03 22:17
test_crypt.py
4.14
KB
-rw-r--r--
2025-06-03 22:17
test_csv.py
49.03
KB
-rw-r--r--
2025-06-03 22:17
test_ctypes.py
184
B
-rw-r--r--
2025-06-03 22:17
test_curses.py
46.28
KB
-rw-r--r--
2025-06-03 22:17
test_dataclasses.py
109.4
KB
-rw-r--r--
2025-06-03 22:17
test_datetime.py
2.3
KB
-rw-r--r--
2025-06-03 22:17
test_dbm.py
6.07
KB
-rw-r--r--
2025-06-03 22:17
test_dbm_dumb.py
10.61
KB
-rw-r--r--
2025-06-03 22:17
test_dbm_gnu.py
6.22
KB
-rw-r--r--
2025-06-03 22:17
test_dbm_ndbm.py
5.05
KB
-rw-r--r--
2025-06-03 22:17
test_decimal.py
209.32
KB
-rw-r--r--
2025-06-03 22:17
test_decorators.py
10.92
KB
-rw-r--r--
2025-06-03 22:17
test_defaultdict.py
7.17
KB
-rw-r--r--
2025-06-03 22:17
test_deque.py
34.52
KB
-rw-r--r--
2025-06-03 22:17
test_descr.py
191.29
KB
-rw-r--r--
2025-06-03 22:17
test_descrtut.py
11.55
KB
-rw-r--r--
2025-06-03 22:17
test_devpoll.py
4.44
KB
-rw-r--r--
2025-06-03 22:17
test_dict.py
46.26
KB
-rw-r--r--
2025-06-03 22:17
test_dict_version.py
6.08
KB
-rw-r--r--
2025-06-03 22:17
test_dictcomps.py
5.15
KB
-rw-r--r--
2025-06-03 22:17
test_dictviews.py
13.49
KB
-rw-r--r--
2025-06-03 22:17
test_difflib.py
21.46
KB
-rw-r--r--
2025-06-03 22:17
test_difflib_expect.html
100.85
KB
-rw-r--r--
2025-06-03 22:17
test_dis.py
53.24
KB
-rw-r--r--
2025-06-03 22:17
test_distutils.py
424
B
-rw-r--r--
2025-06-03 22:17
test_doctest.py
99.28
KB
-rw-r--r--
2025-06-03 22:17
test_doctest.txt
300
B
-rw-r--r--
2025-06-03 22:17
test_doctest2.py
2.36
KB
-rw-r--r--
2025-06-03 22:17
test_doctest2.txt
392
B
-rw-r--r--
2025-06-03 22:17
test_doctest3.txt
82
B
-rw-r--r--
2025-06-03 22:17
test_doctest4.txt
244
B
-rw-r--r--
2025-06-03 22:17
test_docxmlrpc.py
8.67
KB
-rw-r--r--
2025-06-03 22:17
test_dtrace.py
5.14
KB
-rw-r--r--
2025-06-03 22:17
test_dynamic.py
4.29
KB
-rw-r--r--
2025-06-03 22:17
test_dynamicclassattribute.py
9.57
KB
-rw-r--r--
2025-06-03 22:17
test_eintr.py
1.32
KB
-rw-r--r--
2025-06-03 22:17
test_embed.py
51.47
KB
-rw-r--r--
2025-06-03 22:17
test_ensurepip.py
9.83
KB
-rw-r--r--
2025-06-03 22:17
test_enum.py
119.18
KB
-rw-r--r--
2025-06-03 22:17
test_enumerate.py
8.46
KB
-rw-r--r--
2025-06-03 22:17
test_eof.py
2.43
KB
-rw-r--r--
2025-06-03 22:17
test_epoll.py
9.14
KB
-rw-r--r--
2025-06-03 22:17
test_errno.py
1.04
KB
-rw-r--r--
2025-06-03 22:17
test_exception_hierarchy.py
7.43
KB
-rw-r--r--
2025-06-03 22:17
test_exception_variations.py
3.86
KB
-rw-r--r--
2025-06-03 22:17
test_exceptions.py
57.56
KB
-rw-r--r--
2025-06-03 22:17
test_extcall.py
14.05
KB
-rw-r--r--
2025-06-03 22:17
test_faulthandler.py
28.23
KB
-rw-r--r--
2025-06-03 22:17
test_fcntl.py
6.49
KB
-rw-r--r--
2025-06-03 22:17
test_file.py
11.67
KB
-rw-r--r--
2025-06-03 22:17
test_file_eintr.py
10.6
KB
-rw-r--r--
2025-06-03 22:17
test_filecmp.py
8.61
KB
-rw-r--r--
2025-06-03 22:17
test_fileinput.py
37.33
KB
-rw-r--r--
2025-06-03 22:17
test_fileio.py
19.88
KB
-rw-r--r--
2025-06-03 22:17
test_finalization.py
14.66
KB
-rw-r--r--
2025-06-03 22:17
test_float.py
65.49
KB
-rw-r--r--
2025-06-03 22:17
test_flufl.py
1.62
KB
-rw-r--r--
2025-06-03 22:17
test_fnmatch.py
6.77
KB
-rw-r--r--
2025-06-03 22:17
test_fork1.py
3.24
KB
-rw-r--r--
2025-06-03 22:17
test_format.py
23.9
KB
-rw-r--r--
2025-06-03 22:17
test_fractions.py
29.59
KB
-rw-r--r--
2025-06-03 22:17
test_frame.py
5.67
KB
-rw-r--r--
2025-06-03 22:17
test_frozen.py
943
B
-rw-r--r--
2025-06-03 22:17
test_fstring.py
51.38
KB
-rw-r--r--
2025-06-03 22:17
test_ftplib.py
41.75
KB
-rw-r--r--
2025-06-03 22:17
test_funcattrs.py
13.54
KB
-rw-r--r--
2025-06-03 22:17
test_functools.py
102.34
KB
-rw-r--r--
2025-06-03 22:17
test_future.py
12.97
KB
-rw-r--r--
2025-06-03 22:17
test_future3.py
490
B
-rw-r--r--
2025-06-03 22:17
test_future4.py
222
B
-rw-r--r--
2025-06-03 22:17
test_future5.py
510
B
-rw-r--r--
2025-06-03 22:17
test_gc.py
45.83
KB
-rw-r--r--
2025-06-03 22:17
test_gdb.py
42.54
KB
-rw-r--r--
2025-06-03 22:17
test_generator_stop.py
943
B
-rw-r--r--
2025-06-03 22:17
test_generators.py
63.49
KB
-rw-r--r--
2025-06-03 22:17
test_genericalias.py
14.98
KB
-rw-r--r--
2025-06-03 22:17
test_genericclass.py
9.28
KB
-rw-r--r--
2025-06-03 22:17
test_genericpath.py
21.69
KB
-rw-r--r--
2025-06-03 22:17
test_genexps.py
7.58
KB
-rw-r--r--
2025-06-03 22:17
test_getargs2.py
50
KB
-rw-r--r--
2025-06-03 22:17
test_getopt.py
6.75
KB
-rw-r--r--
2025-06-03 22:17
test_getpass.py
6.29
KB
-rw-r--r--
2025-06-03 22:17
test_gettext.py
41.38
KB
-rw-r--r--
2025-06-03 22:17
test_glob.py
13.03
KB
-rw-r--r--
2025-06-03 22:17
test_global.py
1.34
KB
-rw-r--r--
2025-06-03 22:17
test_grammar.py
60.61
KB
-rw-r--r--
2025-06-03 22:17
test_graphlib.py
8.34
KB
-rw-r--r--
2025-06-03 22:17
test_grp.py
3.54
KB
-rw-r--r--
2025-06-03 22:17
test_gzip.py
30.17
KB
-rw-r--r--
2025-06-03 22:17
test_hash.py
11.45
KB
-rw-r--r--
2025-06-03 22:17
test_hashlib.py
43.63
KB
-rw-r--r--
2025-06-03 22:17
test_heapq.py
16.4
KB
-rw-r--r--
2025-06-03 22:17
test_hmac.py
24.94
KB
-rw-r--r--
2025-06-03 22:17
test_html.py
4.23
KB
-rw-r--r--
2025-06-03 22:17
test_htmlparser.py
33.78
KB
-rw-r--r--
2025-06-03 22:17
test_http_cookiejar.py
78.17
KB
-rw-r--r--
2025-06-03 22:17
test_http_cookies.py
20.02
KB
-rw-r--r--
2025-06-03 22:17
test_httplib.py
78.02
KB
-rw-r--r--
2025-06-03 22:17
test_httpservers.py
54.67
KB
-rw-r--r--
2025-06-03 22:17
test_idle.py
1000
B
-rw-r--r--
2025-06-03 22:17
test_imaplib.py
41.66
KB
-rw-r--r--
2025-06-03 22:17
test_imghdr.py
4.66
KB
-rw-r--r--
2025-06-03 22:17
test_imp.py
17.73
KB
-rw-r--r--
2025-06-03 22:17
test_index.py
8.37
KB
-rw-r--r--
2025-06-03 22:17
test_inspect.py
156
KB
-rw-r--r--
2025-06-03 22:17
test_int.py
28.41
KB
-rw-r--r--
2025-06-03 22:17
test_int_literal.py
6.89
KB
-rw-r--r--
2025-06-03 22:17
test_io.py
166.66
KB
-rw-r--r--
2025-06-03 22:17
test_ioctl.py
3.2
KB
-rw-r--r--
2025-06-03 22:17
test_ipaddress.py
125.41
KB
-rw-r--r--
2025-06-03 22:17
test_isinstance.py
11.56
KB
-rw-r--r--
2025-06-03 22:17
test_iter.py
32.46
KB
-rw-r--r--
2025-06-03 22:17
test_iterlen.py
7.1
KB
-rw-r--r--
2025-06-03 22:17
test_itertools.py
101.47
KB
-rw-r--r--
2025-06-03 22:17
test_keyword.py
1.39
KB
-rw-r--r--
2025-06-03 22:17
test_keywordonlyarg.py
6.85
KB
-rw-r--r--
2025-06-03 22:17
test_kqueue.py
8.76
KB
-rw-r--r--
2025-06-03 22:17
test_largefile.py
9.94
KB
-rw-r--r--
2025-06-03 22:17
test_lib2to3.py
264
B
-rw-r--r--
2025-06-03 22:17
test_linecache.py
9.46
KB
-rw-r--r--
2025-06-03 22:17
test_list.py
7.98
KB
-rw-r--r--
2025-06-03 22:17
test_listcomps.py
4.17
KB
-rw-r--r--
2025-06-03 22:17
test_lltrace.py
1013
B
-rw-r--r--
2025-06-03 22:17
test_locale.py
23.82
KB
-rw-r--r--
2025-06-03 22:17
test_logging.py
189.27
KB
-rw-r--r--
2025-06-03 22:17
test_long.py
53.41
KB
-rw-r--r--
2025-06-03 22:17
test_longexp.py
233
B
-rw-r--r--
2025-06-03 22:17
test_lzma.py
87.94
KB
-rw-r--r--
2025-06-03 22:17
test_mailbox.py
91.56
KB
-rw-r--r--
2025-06-03 22:17
test_mailcap.py
10.03
KB
-rw-r--r--
2025-06-03 22:17
test_marshal.py
20.57
KB
-rw-r--r--
2025-06-03 22:17
test_math.py
87.4
KB
-rw-r--r--
2025-06-03 22:17
test_memoryio.py
31.48
KB
-rw-r--r--
2025-06-03 22:17
test_memoryview.py
17.78
KB
-rw-r--r--
2025-06-03 22:17
test_metaclass.py
6.21
KB
-rw-r--r--
2025-06-03 22:17
test_mimetypes.py
13.16
KB
-rw-r--r--
2025-06-03 22:17
test_minidom.py
68.07
KB
-rw-r--r--
2025-06-19 15:26
test_mmap.py
31.02
KB
-rw-r--r--
2025-06-03 22:17
test_module.py
10.22
KB
-rw-r--r--
2025-06-03 22:17
test_modulefinder.py
12.2
KB
-rw-r--r--
2025-06-03 22:17
test_msilib.py
5.03
KB
-rw-r--r--
2025-06-03 22:17
test_multibytecodec.py
14.99
KB
-rw-r--r--
2025-06-03 22:17
test_multiprocessing_fork.py
477
B
-rw-r--r--
2025-06-03 22:17
test_multiprocessing_forkserver.py
392
B
-rw-r--r--
2025-06-03 22:17
test_multiprocessing_main_handling.py
11.45
KB
-rw-r--r--
2025-06-03 22:17
test_multiprocessing_spawn.py
277
B
-rw-r--r--
2025-06-03 22:17
test_named_expressions.py
20.13
KB
-rw-r--r--
2025-06-03 22:17
test_netrc.py
5.96
KB
-rw-r--r--
2025-06-03 22:17
test_nis.py
1.13
KB
-rw-r--r--
2025-06-03 22:17
test_nntplib.py
62.38
KB
-rw-r--r--
2025-06-03 22:17
test_ntpath.py
44.37
KB
-rw-r--r--
2025-06-03 22:17
test_numeric_tower.py
7.18
KB
-rw-r--r--
2025-06-03 22:17
test_opcodes.py
3.61
KB
-rw-r--r--
2025-06-03 22:17
test_openpty.py
600
B
-rw-r--r--
2025-06-03 22:17
test_operator.py
23.9
KB
-rw-r--r--
2025-06-03 22:17
test_optparse.py
60.95
KB
-rw-r--r--
2025-06-03 22:17
test_ordered_dict.py
31.47
KB
-rw-r--r--
2025-06-03 22:17
test_os.py
159.48
KB
-rw-r--r--
2025-06-03 22:17
test_ossaudiodev.py
7.03
KB
-rw-r--r--
2025-06-03 22:17
test_osx_env.py
1.3
KB
-rw-r--r--
2025-06-03 22:17
test_parser.py
37.8
KB
-rw-r--r--
2025-06-03 22:17
test_pathlib.py
104.53
KB
-rw-r--r--
2025-06-03 22:17
test_pdb.py
60.3
KB
-rw-r--r--
2025-06-03 22:17
test_peepholer.py
20.22
KB
-rw-r--r--
2025-06-03 22:17
test_peg_parser.py
23.31
KB
-rw-r--r--
2025-06-03 22:17
test_pickle.py
18.96
KB
-rw-r--r--
2025-06-03 22:17
test_picklebuffer.py
4.96
KB
-rw-r--r--
2025-06-03 22:17
test_pickletools.py
4.34
KB
-rw-r--r--
2025-06-03 22:17
test_pipes.py
6.55
KB
-rw-r--r--
2025-06-03 22:17
test_pkg.py
9.59
KB
-rw-r--r--
2025-06-03 22:17
test_pkgutil.py
22.74
KB
-rw-r--r--
2025-06-03 22:17
test_platform.py
16.55
KB
-rw-r--r--
2025-06-03 22:17
test_plistlib.py
38.68
KB
-rw-r--r--
2025-06-03 22:17
test_poll.py
7.18
KB
-rw-r--r--
2025-06-03 22:17
test_popen.py
2
KB
-rw-r--r--
2025-06-03 22:17
test_poplib.py
17.36
KB
-rw-r--r--
2025-06-03 22:17
test_positional_only_arg.py
17.77
KB
-rw-r--r--
2025-06-03 22:17
test_posix.py
85.96
KB
-rw-r--r--
2025-06-03 22:17
test_posixpath.py
41.26
KB
-rw-r--r--
2025-06-03 22:17
test_pow.py
5.44
KB
-rw-r--r--
2025-06-03 22:17
test_pprint.py
45.34
KB
-rw-r--r--
2025-06-03 22:17
test_print.py
7.37
KB
-rw-r--r--
2025-06-03 22:17
test_profile.py
8.67
KB
-rw-r--r--
2025-06-03 22:17
test_property.py
9.45
KB
-rw-r--r--
2025-06-03 22:17
test_pstats.py
3.56
KB
-rw-r--r--
2025-06-03 22:17
test_pty.py
11.99
KB
-rw-r--r--
2025-06-03 22:17
test_pulldom.py
12.66
KB
-rw-r--r--
2025-06-03 22:17
test_pwd.py
4.17
KB
-rw-r--r--
2025-06-03 22:17
test_py_compile.py
10.85
KB
-rw-r--r--
2025-06-19 15:26
test_pyclbr.py
9.89
KB
-rw-r--r--
2025-06-03 22:17
test_pydoc.py
59.93
KB
-rw-r--r--
2025-06-03 22:17
test_pyexpat.py
28.42
KB
-rw-r--r--
2025-06-03 22:17
test_queue.py
20.42
KB
-rw-r--r--
2025-06-03 22:17
test_quopri.py
7.78
KB
-rw-r--r--
2025-06-03 22:17
test_raise.py
13.44
KB
-rw-r--r--
2025-06-03 22:17
test_random.py
51.57
KB
-rw-r--r--
2025-06-03 22:17
test_range.py
24.33
KB
-rw-r--r--
2025-06-03 22:17
test_re.py
111.78
KB
-rw-r--r--
2025-06-03 22:17
test_readline.py
13.29
KB
-rw-r--r--
2025-06-03 22:17
test_regrtest.py
47.82
KB
-rw-r--r--
2025-06-03 22:17
test_repl.py
3.96
KB
-rw-r--r--
2025-06-03 22:17
test_reprlib.py
15.12
KB
-rw-r--r--
2025-06-03 22:17
test_resource.py
6.96
KB
-rw-r--r--
2025-06-03 22:17
test_richcmp.py
11.91
KB
-rw-r--r--
2025-06-03 22:17
test_rlcompleter.py
7.1
KB
-rw-r--r--
2025-06-03 22:17
test_robotparser.py
10.83
KB
-rw-r--r--
2025-06-03 22:17
test_runpy.py
33.8
KB
-rw-r--r--
2025-06-03 22:17
test_sax.py
48.19
KB
-rw-r--r--
2025-06-03 22:17
test_sched.py
6.39
KB
-rw-r--r--
2025-06-03 22:17
test_scope.py
19.83
KB
-rw-r--r--
2025-06-03 22:17
test_script_helper.py
5.78
KB
-rw-r--r--
2025-06-03 22:17
test_secrets.py
4.28
KB
-rw-r--r--
2025-06-03 22:17
test_select.py
2.69
KB
-rw-r--r--
2025-06-03 22:17
test_selectors.py
18.23
KB
-rw-r--r--
2025-06-03 22:17
test_set.py
70.16
KB
-rw-r--r--
2025-06-03 22:17
test_setcomps.py
4.15
KB
-rw-r--r--
2025-06-03 22:17
test_shelve.py
5.96
KB
-rw-r--r--
2025-06-03 22:17
test_shlex.py
13.48
KB
-rw-r--r--
2025-06-03 22:17
test_shutil.py
104.25
KB
-rw-r--r--
2025-06-03 22:17
test_signal.py
48
KB
-rw-r--r--
2025-06-03 22:17
test_site.py
26.72
KB
-rw-r--r--
2025-06-03 22:17
test_slice.py
8.25
KB
-rw-r--r--
2025-06-03 22:17
test_smtpd.py
40.32
KB
-rw-r--r--
2025-06-03 22:17
test_smtplib.py
59.72
KB
-rw-r--r--
2025-06-03 22:17
test_smtpnet.py
2.94
KB
-rw-r--r--
2025-06-03 22:17
test_sndhdr.py
1.43
KB
-rw-r--r--
2025-06-03 22:17
test_socket.py
250.24
KB
-rw-r--r--
2025-06-03 22:17
test_socketserver.py
17.69
KB
-rw-r--r--
2025-06-03 22:17
test_sort.py
13.42
KB
-rw-r--r--
2025-06-03 22:17
test_source_encoding.py
8
KB
-rw-r--r--
2025-06-03 22:17
test_spwd.py
2.71
KB
-rw-r--r--
2025-06-03 22:17
test_sqlite.py
948
B
-rw-r--r--
2025-06-03 22:17
test_ssl.py
215.94
KB
-rw-r--r--
2025-06-03 22:17
test_startfile.py
1.29
KB
-rw-r--r--
2025-06-03 22:17
test_stat.py
8.3
KB
-rw-r--r--
2025-06-03 22:17
test_statistics.py
109.11
KB
-rw-r--r--
2025-06-03 22:17
test_strftime.py
7.54
KB
-rw-r--r--
2025-06-03 22:17
test_string.py
19.8
KB
-rw-r--r--
2025-06-03 22:17
test_string_literals.py
9.97
KB
-rw-r--r--
2025-06-03 22:17
test_stringprep.py
3.04
KB
-rw-r--r--
2025-06-03 22:17
test_strptime.py
34.42
KB
-rw-r--r--
2025-06-03 22:17
test_strtod.py
20.06
KB
-rw-r--r--
2025-06-03 22:17
test_struct.py
35.18
KB
-rw-r--r--
2025-06-03 22:17
test_structmembers.py
4.7
KB
-rw-r--r--
2025-06-03 22:17
test_structseq.py
3.87
KB
-rw-r--r--
2025-06-03 22:17
test_subclassinit.py
8.12
KB
-rw-r--r--
2025-06-03 22:17
test_subprocess.py
152.71
KB
-rw-r--r--
2025-06-03 22:17
test_sunau.py
5.98
KB
-rw-r--r--
2025-06-03 22:17
test_sundry.py
2.07
KB
-rw-r--r--
2025-06-03 22:17
test_super.py
9.6
KB
-rw-r--r--
2025-06-03 22:17
test_support.py
25.3
KB
-rw-r--r--
2025-06-03 22:17
test_symbol.py
2.06
KB
-rw-r--r--
2025-06-03 22:17
test_symtable.py
9.09
KB
-rw-r--r--
2025-06-03 22:17
test_syntax.py
34.08
KB
-rw-r--r--
2025-06-03 22:17
test_sys.py
55.28
KB
-rw-r--r--
2025-06-03 22:17
test_sys_setprofile.py
12.31
KB
-rw-r--r--
2025-06-03 22:17
test_sys_settrace.py
48.64
KB
-rw-r--r--
2025-06-03 22:17
test_sysconfig.py
17.01
KB
-rw-r--r--
2025-06-03 22:17
test_syslog.py
1.15
KB
-rw-r--r--
2025-06-03 22:17
test_tabnanny.py
13.41
KB
-rw-r--r--
2025-06-03 22:17
test_tarfile.py
165.71
KB
-rw-r--r--
2025-06-03 22:17
test_tcl.py
31.27
KB
-rw-r--r--
2025-06-03 22:17
test_telnetlib.py
12.75
KB
-rw-r--r--
2025-06-03 22:17
test_tempfile.py
59.32
KB
-rw-r--r--
2025-06-03 22:17
test_textwrap.py
38.84
KB
-rw-r--r--
2025-06-03 22:17
test_thread.py
8.42
KB
-rw-r--r--
2025-06-03 22:17
test_threadedtempfile.py
1.85
KB
-rw-r--r--
2025-06-03 22:17
test_threading.py
52.54
KB
-rw-r--r--
2025-06-03 22:17
test_threading_local.py
6.62
KB
-rw-r--r--
2025-06-03 22:17
test_threadsignals.py
10.06
KB
-rw-r--r--
2025-06-03 22:17
test_time.py
39.88
KB
-rw-r--r--
2025-06-03 22:17
test_timeit.py
14.8
KB
-rw-r--r--
2025-06-03 22:17
test_timeout.py
11.01
KB
-rw-r--r--
2025-06-03 22:17
test_tix.py
932
B
-rw-r--r--
2025-06-03 22:17
test_tk.py
501
B
-rw-r--r--
2025-06-03 22:17
test_tokenize.py
63.79
KB
-rw-r--r--
2025-06-03 22:17
test_trace.py
19.98
KB
-rw-r--r--
2025-06-03 22:17
test_traceback.py
49.59
KB
-rw-r--r--
2025-06-03 22:17
test_tracemalloc.py
39.12
KB
-rw-r--r--
2025-06-03 22:17
test_ttk_guionly.py
941
B
-rw-r--r--
2025-06-03 22:17
test_ttk_textonly.py
16.67
KB
-rw-r--r--
2025-06-03 22:17
test_tuple.py
18.85
KB
-rw-r--r--
2025-06-03 22:17
test_turtle.py
12.66
KB
-rw-r--r--
2025-06-03 22:17
test_type_comments.py
10.53
KB
-rw-r--r--
2025-06-03 22:17
test_typechecks.py
2.55
KB
-rw-r--r--
2025-06-03 22:17
test_types.py
59.86
KB
-rw-r--r--
2025-06-03 22:17
test_typing.py
140.02
KB
-rw-r--r--
2025-06-03 22:17
test_ucn.py
9.5
KB
-rw-r--r--
2025-06-03 22:17
test_unary.py
1.63
KB
-rw-r--r--
2025-06-03 22:17
test_unicode.py
135.54
KB
-rw-r--r--
2025-06-03 22:17
test_unicode_file.py
5.69
KB
-rw-r--r--
2025-06-03 22:17
test_unicode_file_functions.py
6.65
KB
-rw-r--r--
2025-06-03 22:17
test_unicode_identifiers.py
984
B
-rw-r--r--
2025-06-03 22:17
test_unicodedata.py
15.63
KB
-rw-r--r--
2025-06-03 22:17
test_unittest.py
226
B
-rw-r--r--
2025-06-03 22:17
test_univnewlines.py
3.83
KB
-rw-r--r--
2025-06-03 22:17
test_unpack.py
3.01
KB
-rw-r--r--
2025-06-03 22:17
test_unpack_ex.py
10.06
KB
-rw-r--r--
2025-06-03 22:17
test_unparse.py
18.23
KB
-rw-r--r--
2025-06-03 22:17
test_urllib.py
69.92
KB
-rw-r--r--
2025-06-03 22:17
test_urllib2.py
78.67
KB
-rw-r--r--
2025-06-03 22:17
test_urllib2_localnet.py
25.41
KB
-rw-r--r--
2025-06-03 22:17
test_urllib2net.py
12.7
KB
-rw-r--r--
2025-06-03 22:17
test_urllib_response.py
1.89
KB
-rw-r--r--
2025-06-03 22:17
test_urllibnet.py
9.28
KB
-rw-r--r--
2025-06-03 22:17
test_urlparse.py
74.6
KB
-rw-r--r--
2025-06-03 22:17
test_userdict.py
7.56
KB
-rw-r--r--
2025-06-03 22:17
test_userlist.py
1.97
KB
-rw-r--r--
2025-06-03 22:17
test_userstring.py
2.4
KB
-rw-r--r--
2025-06-03 22:17
test_utf8_mode.py
9.22
KB
-rw-r--r--
2025-06-03 22:17
test_utf8source.py
1.15
KB
-rw-r--r--
2025-06-03 22:17
test_uu.py
8.85
KB
-rw-r--r--
2025-06-03 22:17
test_uuid.py
39.95
KB
-rw-r--r--
2025-06-03 22:17
test_venv.py
25.64
KB
-rw-r--r--
2025-06-03 22:17
test_wait3.py
1.81
KB
-rw-r--r--
2025-06-03 22:17
test_wait4.py
1.16
KB
-rw-r--r--
2025-06-03 22:17
test_wave.py
6.53
KB
-rw-r--r--
2025-06-03 22:17
test_weakref.py
74.31
KB
-rw-r--r--
2025-06-03 22:17
test_weakset.py
15.42
KB
-rw-r--r--
2025-06-03 22:17
test_webbrowser.py
10.47
KB
-rw-r--r--
2025-06-03 22:17
test_winconsoleio.py
6.56
KB
-rw-r--r--
2025-06-03 22:17
test_winreg.py
21.27
KB
-rw-r--r--
2025-06-03 22:17
test_winsound.py
4.57
KB
-rw-r--r--
2025-06-03 22:17
test_with.py
25.99
KB
-rw-r--r--
2025-06-03 22:17
test_wsgiref.py
30.15
KB
-rw-r--r--
2025-06-03 22:17
test_xdrlib.py
2.17
KB
-rw-r--r--
2025-06-03 22:17
test_xml_dom_minicompat.py
4.18
KB
-rw-r--r--
2025-06-03 22:17
test_xml_etree.py
158.85
KB
-rw-r--r--
2025-06-03 22:17
test_xml_etree_c.py
8.46
KB
-rw-r--r--
2025-06-03 22:17
test_xmlrpc.py
57.56
KB
-rw-r--r--
2025-06-03 22:17
test_xmlrpc_net.py
954
B
-rw-r--r--
2025-06-03 22:17
test_xxtestfuzz.py
670
B
-rw-r--r--
2025-06-03 22:17
test_yield_from.py
30.01
KB
-rw-r--r--
2025-06-03 22:17
test_zipapp.py
15.92
KB
-rw-r--r--
2025-06-03 22:17
test_zipfile.py
123.16
KB
-rw-r--r--
2025-06-03 22:17
test_zipfile64.py
5.8
KB
-rw-r--r--
2025-06-03 22:17
test_zipimport.py
29.3
KB
-rw-r--r--
2025-06-03 22:17
test_zipimport_support.py
10.44
KB
-rw-r--r--
2025-06-03 22:17
test_zlib.py
34.73
KB
-rw-r--r--
2025-06-03 22:17
testcodec.py
1.02
KB
-rw-r--r--
2025-06-03 22:17
testtar.tar
425
KB
-rw-r--r--
2025-06-03 22:17
tf_inherit_check.py
714
B
-rw-r--r--
2025-06-03 22:17
time_hashlib.py
2.87
KB
-rw-r--r--
2025-06-03 22:17
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
443
B
-rw-r--r--
2025-06-03 22:17
tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
302
B
-rw-r--r--
2025-06-03 22:17
tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
421
B
-rw-r--r--
2025-06-03 22:17
tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
326
B
-rw-r--r--
2025-06-03 22:17
tokenize_tests.txt
2.65
KB
-rw-r--r--
2025-06-03 22:17
win_console_handler.py
1.38
KB
-rw-r--r--
2025-06-03 22:17
xmltests.py
499
B
-rw-r--r--
2025-06-03 22:17
zip_cp437_header.zip
270
B
-rw-r--r--
2025-06-03 22:17
zipdir.zip
374
B
-rw-r--r--
2025-06-03 22:17
Save
Rename
import codecs import html.entities import itertools import sys import unicodedata import unittest class PosReturn: # this can be used for configurable callbacks def __init__(self): self.pos = 0 def handle(self, exc): oldpos = self.pos realpos = oldpos if realpos<0: realpos = len(exc.object) + realpos # if we don't advance this time, terminate on the next call # otherwise we'd get an endless loop if realpos <= exc.start: self.pos = len(exc.object) return ("<?>", oldpos) class RepeatedPosReturn: def __init__(self, repl="<?>"): self.repl = repl self.pos = 0 self.count = 0 def handle(self, exc): if self.count > 0: self.count -= 1 return (self.repl, self.pos) return (self.repl, exc.end) # A UnicodeEncodeError object with a bad start attribute class BadStartUnicodeEncodeError(UnicodeEncodeError): def __init__(self): UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad") self.start = [] # A UnicodeEncodeError object with a bad object attribute class BadObjectUnicodeEncodeError(UnicodeEncodeError): def __init__(self): UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad") self.object = [] # A UnicodeDecodeError object without an end attribute class NoEndUnicodeDecodeError(UnicodeDecodeError): def __init__(self): UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") del self.end # A UnicodeDecodeError object with a bad object attribute class BadObjectUnicodeDecodeError(UnicodeDecodeError): def __init__(self): UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") self.object = [] # A UnicodeTranslateError object without a start attribute class NoStartUnicodeTranslateError(UnicodeTranslateError): def __init__(self): UnicodeTranslateError.__init__(self, "", 0, 1, "bad") del self.start # A UnicodeTranslateError object without an end attribute class NoEndUnicodeTranslateError(UnicodeTranslateError): def __init__(self): UnicodeTranslateError.__init__(self, "", 0, 1, "bad") del self.end # A UnicodeTranslateError object without an object attribute class NoObjectUnicodeTranslateError(UnicodeTranslateError): def __init__(self): UnicodeTranslateError.__init__(self, "", 0, 1, "bad") del self.object class CodecCallbackTest(unittest.TestCase): def test_xmlcharrefreplace(self): # replace unencodable characters which numeric character entities. # For ascii, latin-1 and charmaps this is completely implemented # in C and should be reasonably fast. s = "\u30b9\u30d1\u30e2 \xe4nd eggs" self.assertEqual( s.encode("ascii", "xmlcharrefreplace"), b"スパモ änd eggs" ) self.assertEqual( s.encode("latin-1", "xmlcharrefreplace"), b"スパモ \xe4nd eggs" ) def test_xmlcharnamereplace(self): # This time use a named character entity for unencodable # characters, if one is available. def xmlcharnamereplace(exc): if not isinstance(exc, UnicodeEncodeError): raise TypeError("don't know how to handle %r" % exc) l = [] for c in exc.object[exc.start:exc.end]: try: l.append("&%s;" % html.entities.codepoint2name[ord(c)]) except KeyError: l.append("&#%d;" % ord(c)) return ("".join(l), exc.end) codecs.register_error( "test.xmlcharnamereplace", xmlcharnamereplace) sin = "\xab\u211c\xbb = \u2329\u1234\u20ac\u232a" sout = b"«ℜ» = ⟨ሴ€⟩" self.assertEqual(sin.encode("ascii", "test.xmlcharnamereplace"), sout) sout = b"\xabℜ\xbb = ⟨ሴ€⟩" self.assertEqual(sin.encode("latin-1", "test.xmlcharnamereplace"), sout) sout = b"\xabℜ\xbb = ⟨ሴ\xa4⟩" self.assertEqual(sin.encode("iso-8859-15", "test.xmlcharnamereplace"), sout) def test_uninamereplace(self): # We're using the names from the unicode database this time, # and we're doing "syntax highlighting" here, i.e. we include # the replaced text in ANSI escape sequences. For this it is # useful that the error handler is not called for every single # unencodable character, but for a complete sequence of # unencodable characters, otherwise we would output many # unnecessary escape sequences. def uninamereplace(exc): if not isinstance(exc, UnicodeEncodeError): raise TypeError("don't know how to handle %r" % exc) l = [] for c in exc.object[exc.start:exc.end]: l.append(unicodedata.name(c, "0x%x" % ord(c))) return ("\033[1m%s\033[0m" % ", ".join(l), exc.end) codecs.register_error( "test.uninamereplace", uninamereplace) sin = "\xac\u1234\u20ac\u8000" sout = b"\033[1mNOT SIGN, ETHIOPIC SYLLABLE SEE, EURO SIGN, CJK UNIFIED IDEOGRAPH-8000\033[0m" self.assertEqual(sin.encode("ascii", "test.uninamereplace"), sout) sout = b"\xac\033[1mETHIOPIC SYLLABLE SEE, EURO SIGN, CJK UNIFIED IDEOGRAPH-8000\033[0m" self.assertEqual(sin.encode("latin-1", "test.uninamereplace"), sout) sout = b"\xac\033[1mETHIOPIC SYLLABLE SEE\033[0m\xa4\033[1mCJK UNIFIED IDEOGRAPH-8000\033[0m" self.assertEqual(sin.encode("iso-8859-15", "test.uninamereplace"), sout) def test_backslashescape(self): # Does the same as the "unicode-escape" encoding, but with different # base encodings. sin = "a\xac\u1234\u20ac\u8000\U0010ffff" sout = b"a\\xac\\u1234\\u20ac\\u8000\\U0010ffff" self.assertEqual(sin.encode("ascii", "backslashreplace"), sout) sout = b"a\xac\\u1234\\u20ac\\u8000\\U0010ffff" self.assertEqual(sin.encode("latin-1", "backslashreplace"), sout) sout = b"a\xac\\u1234\xa4\\u8000\\U0010ffff" self.assertEqual(sin.encode("iso-8859-15", "backslashreplace"), sout) def test_nameescape(self): # Does the same as backslashescape, but prefers ``\N{...}`` escape # sequences. sin = "a\xac\u1234\u20ac\u8000\U0010ffff" sout = (b'a\\N{NOT SIGN}\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}' b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff') self.assertEqual(sin.encode("ascii", "namereplace"), sout) sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}' b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff') self.assertEqual(sin.encode("latin-1", "namereplace"), sout) sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\xa4' b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff') self.assertEqual(sin.encode("iso-8859-15", "namereplace"), sout) def test_decoding_callbacks(self): # This is a test for a decoding callback handler # that allows the decoding of the invalid sequence # "\xc0\x80" and returns "\x00" instead of raising an error. # All other illegal sequences will be handled strictly. def relaxedutf8(exc): if not isinstance(exc, UnicodeDecodeError): raise TypeError("don't know how to handle %r" % exc) if exc.object[exc.start:exc.start+2] == b"\xc0\x80": return ("\x00", exc.start+2) # retry after two bytes else: raise exc codecs.register_error("test.relaxedutf8", relaxedutf8) # all the "\xc0\x80" will be decoded to "\x00" sin = b"a\x00b\xc0\x80c\xc3\xbc\xc0\x80\xc0\x80" sout = "a\x00b\x00c\xfc\x00\x00" self.assertEqual(sin.decode("utf-8", "test.relaxedutf8"), sout) # "\xc0\x81" is not valid and a UnicodeDecodeError will be raised sin = b"\xc0\x80\xc0\x81" self.assertRaises(UnicodeDecodeError, sin.decode, "utf-8", "test.relaxedutf8") def test_charmapencode(self): # For charmap encodings the replacement string will be # mapped through the encoding again. This means, that # to be able to use e.g. the "replace" handler, the # charmap has to have a mapping for "?". charmap = dict((ord(c), bytes(2*c.upper(), 'ascii')) for c in "abcdefgh") sin = "abc" sout = b"AABBCC" self.assertEqual(codecs.charmap_encode(sin, "strict", charmap)[0], sout) sin = "abcA" self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap) charmap[ord("?")] = b"XYZ" sin = "abcDEF" sout = b"AABBCCXYZXYZXYZ" self.assertEqual(codecs.charmap_encode(sin, "replace", charmap)[0], sout) charmap[ord("?")] = "XYZ" # wrong type in mapping self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap) def test_callbacks(self): def handler1(exc): r = range(exc.start, exc.end) if isinstance(exc, UnicodeEncodeError): l = ["<%d>" % ord(exc.object[pos]) for pos in r] elif isinstance(exc, UnicodeDecodeError): l = ["<%d>" % exc.object[pos] for pos in r] else: raise TypeError("don't know how to handle %r" % exc) return ("[%s]" % "".join(l), exc.end) codecs.register_error("test.handler1", handler1) def handler2(exc): if not isinstance(exc, UnicodeDecodeError): raise TypeError("don't know how to handle %r" % exc) l = ["<%d>" % exc.object[pos] for pos in range(exc.start, exc.end)] return ("[%s]" % "".join(l), exc.end+1) # skip one character codecs.register_error("test.handler2", handler2) s = b"\x00\x81\x7f\x80\xff" self.assertEqual( s.decode("ascii", "test.handler1"), "\x00[<129>]\x7f[<128>][<255>]" ) self.assertEqual( s.decode("ascii", "test.handler2"), "\x00[<129>][<128>]" ) self.assertEqual( b"\\u3042\\u3xxx".decode("unicode-escape", "test.handler1"), "\u3042[<92><117><51>]xxx" ) self.assertEqual( b"\\u3042\\u3xx".decode("unicode-escape", "test.handler1"), "\u3042[<92><117><51>]xx" ) self.assertEqual( codecs.charmap_decode(b"abc", "test.handler1", {ord("a"): "z"})[0], "z[<98>][<99>]" ) self.assertEqual( "g\xfc\xdfrk".encode("ascii", "test.handler1"), b"g[<252><223>]rk" ) self.assertEqual( "g\xfc\xdf".encode("ascii", "test.handler1"), b"g[<252><223>]" ) def test_longstrings(self): # test long strings to check for memory overflow problems errors = [ "strict", "ignore", "replace", "xmlcharrefreplace", "backslashreplace", "namereplace"] # register the handlers under different names, # to prevent the codec from recognizing the name for err in errors: codecs.register_error("test." + err, codecs.lookup_error(err)) l = 1000 errors += [ "test." + err for err in errors ] for uni in [ s*l for s in ("x", "\u3042", "a\xe4") ]: for enc in ("ascii", "latin-1", "iso-8859-1", "iso-8859-15", "utf-8", "utf-7", "utf-16", "utf-32"): for err in errors: try: uni.encode(enc, err) except UnicodeError: pass def check_exceptionobjectargs(self, exctype, args, msg): # Test UnicodeError subclasses: construction, attribute assignment and __str__ conversion # check with one missing argument self.assertRaises(TypeError, exctype, *args[:-1]) # check with one argument too much self.assertRaises(TypeError, exctype, *(args + ["too much"])) # check with one argument of the wrong type wrongargs = [ "spam", b"eggs", b"spam", 42, 1.0, None ] for i in range(len(args)): for wrongarg in wrongargs: if type(wrongarg) is type(args[i]): continue # build argument array callargs = [] for j in range(len(args)): if i==j: callargs.append(wrongarg) else: callargs.append(args[i]) self.assertRaises(TypeError, exctype, *callargs) # check with the correct number and type of arguments exc = exctype(*args) self.assertEqual(str(exc), msg) def test_unicodeencodeerror(self): self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "g\xfcrk", 1, 2, "ouch"], "'ascii' codec can't encode character '\\xfc' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "g\xfcrk", 1, 4, "ouch"], "'ascii' codec can't encode characters in position 1-3: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\xfcx", 0, 1, "ouch"], "'ascii' codec can't encode character '\\xfc' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\u0100x", 0, 1, "ouch"], "'ascii' codec can't encode character '\\u0100' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\uffffx", 0, 1, "ouch"], "'ascii' codec can't encode character '\\uffff' in position 0: ouch" ) self.check_exceptionobjectargs( UnicodeEncodeError, ["ascii", "\U00010000x", 0, 1, "ouch"], "'ascii' codec can't encode character '\\U00010000' in position 0: ouch" ) def test_unicodedecodeerror(self): self.check_exceptionobjectargs( UnicodeDecodeError, ["ascii", bytearray(b"g\xfcrk"), 1, 2, "ouch"], "'ascii' codec can't decode byte 0xfc in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeDecodeError, ["ascii", bytearray(b"g\xfcrk"), 1, 3, "ouch"], "'ascii' codec can't decode bytes in position 1-2: ouch" ) def test_unicodetranslateerror(self): self.check_exceptionobjectargs( UnicodeTranslateError, ["g\xfcrk", 1, 2, "ouch"], "can't translate character '\\xfc' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\u0100rk", 1, 2, "ouch"], "can't translate character '\\u0100' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\uffffrk", 1, 2, "ouch"], "can't translate character '\\uffff' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\U00010000rk", 1, 2, "ouch"], "can't translate character '\\U00010000' in position 1: ouch" ) self.check_exceptionobjectargs( UnicodeTranslateError, ["g\xfcrk", 1, 3, "ouch"], "can't translate characters in position 1-2: ouch" ) def test_badandgoodstrictexceptions(self): # "strict" complains about a non-exception passed in self.assertRaises( TypeError, codecs.strict_errors, 42 ) # "strict" complains about the wrong exception type self.assertRaises( Exception, codecs.strict_errors, Exception("ouch") ) # If the correct exception is passed in, "strict" raises it self.assertRaises( UnicodeEncodeError, codecs.strict_errors, UnicodeEncodeError("ascii", "\u3042", 0, 1, "ouch") ) self.assertRaises( UnicodeDecodeError, codecs.strict_errors, UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") ) self.assertRaises( UnicodeTranslateError, codecs.strict_errors, UnicodeTranslateError("\u3042", 0, 1, "ouch") ) def test_badandgoodignoreexceptions(self): # "ignore" complains about a non-exception passed in self.assertRaises( TypeError, codecs.ignore_errors, 42 ) # "ignore" complains about the wrong exception type self.assertRaises( TypeError, codecs.ignore_errors, UnicodeError("ouch") ) # If the correct exception is passed in, "ignore" returns an empty replacement self.assertEqual( codecs.ignore_errors( UnicodeEncodeError("ascii", "a\u3042b", 1, 2, "ouch")), ("", 2) ) self.assertEqual( codecs.ignore_errors( UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")), ("", 2) ) self.assertEqual( codecs.ignore_errors( UnicodeTranslateError("a\u3042b", 1, 2, "ouch")), ("", 2) ) def test_badandgoodreplaceexceptions(self): # "replace" complains about a non-exception passed in self.assertRaises( TypeError, codecs.replace_errors, 42 ) # "replace" complains about the wrong exception type self.assertRaises( TypeError, codecs.replace_errors, UnicodeError("ouch") ) self.assertRaises( TypeError, codecs.replace_errors, BadObjectUnicodeEncodeError() ) self.assertRaises( TypeError, codecs.replace_errors, BadObjectUnicodeDecodeError() ) # With the correct exception, "replace" returns an "?" or "\ufffd" replacement self.assertEqual( codecs.replace_errors( UnicodeEncodeError("ascii", "a\u3042b", 1, 2, "ouch")), ("?", 2) ) self.assertEqual( codecs.replace_errors( UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")), ("\ufffd", 2) ) self.assertEqual( codecs.replace_errors( UnicodeTranslateError("a\u3042b", 1, 2, "ouch")), ("\ufffd", 2) ) def test_badandgoodxmlcharrefreplaceexceptions(self): # "xmlcharrefreplace" complains about a non-exception passed in self.assertRaises( TypeError, codecs.xmlcharrefreplace_errors, 42 ) # "xmlcharrefreplace" complains about the wrong exception types self.assertRaises( TypeError, codecs.xmlcharrefreplace_errors, UnicodeError("ouch") ) # "xmlcharrefreplace" can only be used for encoding self.assertRaises( TypeError, codecs.xmlcharrefreplace_errors, UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") ) self.assertRaises( TypeError, codecs.xmlcharrefreplace_errors, UnicodeTranslateError("\u3042", 0, 1, "ouch") ) # Use the correct exception cs = (0, 1, 9, 10, 99, 100, 999, 1000, 9999, 10000, 99999, 100000, 999999, 1000000) cs += (0xd800, 0xdfff) s = "".join(chr(c) for c in cs) self.assertEqual( codecs.xmlcharrefreplace_errors( UnicodeEncodeError("ascii", "a" + s + "b", 1, 1 + len(s), "ouch") ), ("".join("&#%d;" % c for c in cs), 1 + len(s)) ) def test_badandgoodbackslashreplaceexceptions(self): # "backslashreplace" complains about a non-exception passed in self.assertRaises( TypeError, codecs.backslashreplace_errors, 42 ) # "backslashreplace" complains about the wrong exception types self.assertRaises( TypeError, codecs.backslashreplace_errors, UnicodeError("ouch") ) # Use the correct exception tests = [ ("\u3042", "\\u3042"), ("\n", "\\x0a"), ("a", "\\x61"), ("\x00", "\\x00"), ("\xff", "\\xff"), ("\u0100", "\\u0100"), ("\uffff", "\\uffff"), ("\U00010000", "\\U00010000"), ("\U0010ffff", "\\U0010ffff"), # Lone surrogates ("\ud800", "\\ud800"), ("\udfff", "\\udfff"), ("\ud800\udfff", "\\ud800\\udfff"), ] for s, r in tests: with self.subTest(str=s): self.assertEqual( codecs.backslashreplace_errors( UnicodeEncodeError("ascii", "a" + s + "b", 1, 1 + len(s), "ouch")), (r, 1 + len(s)) ) self.assertEqual( codecs.backslashreplace_errors( UnicodeTranslateError("a" + s + "b", 1, 1 + len(s), "ouch")), (r, 1 + len(s)) ) tests = [ (b"a", "\\x61"), (b"\n", "\\x0a"), (b"\x00", "\\x00"), (b"\xff", "\\xff"), ] for b, r in tests: with self.subTest(bytes=b): self.assertEqual( codecs.backslashreplace_errors( UnicodeDecodeError("ascii", bytearray(b"a" + b + b"b"), 1, 2, "ouch")), (r, 2) ) def test_badandgoodnamereplaceexceptions(self): # "namereplace" complains about a non-exception passed in self.assertRaises( TypeError, codecs.namereplace_errors, 42 ) # "namereplace" complains about the wrong exception types self.assertRaises( TypeError, codecs.namereplace_errors, UnicodeError("ouch") ) # "namereplace" can only be used for encoding self.assertRaises( TypeError, codecs.namereplace_errors, UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") ) self.assertRaises( TypeError, codecs.namereplace_errors, UnicodeTranslateError("\u3042", 0, 1, "ouch") ) # Use the correct exception tests = [ ("\u3042", "\\N{HIRAGANA LETTER A}"), ("\x00", "\\x00"), ("\ufbf9", "\\N{ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH " "HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM}"), ("\U000e007f", "\\N{CANCEL TAG}"), ("\U0010ffff", "\\U0010ffff"), # Lone surrogates ("\ud800", "\\ud800"), ("\udfff", "\\udfff"), ("\ud800\udfff", "\\ud800\\udfff"), ] for s, r in tests: with self.subTest(str=s): self.assertEqual( codecs.namereplace_errors( UnicodeEncodeError("ascii", "a" + s + "b", 1, 1 + len(s), "ouch")), (r, 1 + len(s)) ) def test_badandgoodsurrogateescapeexceptions(self): surrogateescape_errors = codecs.lookup_error('surrogateescape') # "surrogateescape" complains about a non-exception passed in self.assertRaises( TypeError, surrogateescape_errors, 42 ) # "surrogateescape" complains about the wrong exception types self.assertRaises( TypeError, surrogateescape_errors, UnicodeError("ouch") ) # "surrogateescape" can not be used for translating self.assertRaises( TypeError, surrogateescape_errors, UnicodeTranslateError("\udc80", 0, 1, "ouch") ) # Use the correct exception for s in ("a", "\udc7f", "\udd00"): with self.subTest(str=s): self.assertRaises( UnicodeEncodeError, surrogateescape_errors, UnicodeEncodeError("ascii", s, 0, 1, "ouch") ) self.assertEqual( surrogateescape_errors( UnicodeEncodeError("ascii", "a\udc80b", 1, 2, "ouch")), (b"\x80", 2) ) self.assertRaises( UnicodeDecodeError, surrogateescape_errors, UnicodeDecodeError("ascii", bytearray(b"a"), 0, 1, "ouch") ) self.assertEqual( surrogateescape_errors( UnicodeDecodeError("ascii", bytearray(b"a\x80b"), 1, 2, "ouch")), ("\udc80", 2) ) def test_badandgoodsurrogatepassexceptions(self): surrogatepass_errors = codecs.lookup_error('surrogatepass') # "surrogatepass" complains about a non-exception passed in self.assertRaises( TypeError, surrogatepass_errors, 42 ) # "surrogatepass" complains about the wrong exception types self.assertRaises( TypeError, surrogatepass_errors, UnicodeError("ouch") ) # "surrogatepass" can not be used for translating self.assertRaises( TypeError, surrogatepass_errors, UnicodeTranslateError("\ud800", 0, 1, "ouch") ) # Use the correct exception for enc in ("utf-8", "utf-16le", "utf-16be", "utf-32le", "utf-32be"): with self.subTest(encoding=enc): self.assertRaises( UnicodeEncodeError, surrogatepass_errors, UnicodeEncodeError(enc, "a", 0, 1, "ouch") ) self.assertRaises( UnicodeDecodeError, surrogatepass_errors, UnicodeDecodeError(enc, "a".encode(enc), 0, 1, "ouch") ) for s in ("\ud800", "\udfff", "\ud800\udfff"): with self.subTest(str=s): self.assertRaises( UnicodeEncodeError, surrogatepass_errors, UnicodeEncodeError("ascii", s, 0, len(s), "ouch") ) tests = [ ("utf-8", "\ud800", b'\xed\xa0\x80', 3), ("utf-16le", "\ud800", b'\x00\xd8', 2), ("utf-16be", "\ud800", b'\xd8\x00', 2), ("utf-32le", "\ud800", b'\x00\xd8\x00\x00', 4), ("utf-32be", "\ud800", b'\x00\x00\xd8\x00', 4), ("utf-8", "\udfff", b'\xed\xbf\xbf', 3), ("utf-16le", "\udfff", b'\xff\xdf', 2), ("utf-16be", "\udfff", b'\xdf\xff', 2), ("utf-32le", "\udfff", b'\xff\xdf\x00\x00', 4), ("utf-32be", "\udfff", b'\x00\x00\xdf\xff', 4), ("utf-8", "\ud800\udfff", b'\xed\xa0\x80\xed\xbf\xbf', 3), ("utf-16le", "\ud800\udfff", b'\x00\xd8\xff\xdf', 2), ("utf-16be", "\ud800\udfff", b'\xd8\x00\xdf\xff', 2), ("utf-32le", "\ud800\udfff", b'\x00\xd8\x00\x00\xff\xdf\x00\x00', 4), ("utf-32be", "\ud800\udfff", b'\x00\x00\xd8\x00\x00\x00\xdf\xff', 4), ] for enc, s, b, n in tests: with self.subTest(encoding=enc, str=s, bytes=b): self.assertEqual( surrogatepass_errors( UnicodeEncodeError(enc, "a" + s + "b", 1, 1 + len(s), "ouch")), (b, 1 + len(s)) ) self.assertEqual( surrogatepass_errors( UnicodeDecodeError(enc, bytearray(b"a" + b[:n] + b"b"), 1, 1 + n, "ouch")), (s[:1], 1 + n) ) def test_badhandlerresults(self): results = ( 42, "foo", (1,2,3), ("foo", 1, 3), ("foo", None), ("foo",), ("foo", 1, 3), ("foo", None), ("foo",) ) encs = ("ascii", "latin-1", "iso-8859-1", "iso-8859-15") for res in results: codecs.register_error("test.badhandler", lambda x: res) for enc in encs: self.assertRaises( TypeError, "\u3042".encode, enc, "test.badhandler" ) for (enc, bytes) in ( ("ascii", b"\xff"), ("utf-8", b"\xff"), ("utf-7", b"+x-"), ): self.assertRaises( TypeError, bytes.decode, enc, "test.badhandler" ) def test_lookup(self): self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict")) self.assertEqual(codecs.ignore_errors, codecs.lookup_error("ignore")) self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict")) self.assertEqual( codecs.xmlcharrefreplace_errors, codecs.lookup_error("xmlcharrefreplace") ) self.assertEqual( codecs.backslashreplace_errors, codecs.lookup_error("backslashreplace") ) self.assertEqual( codecs.namereplace_errors, codecs.lookup_error("namereplace") ) def test_encode_nonascii_replacement(self): def handle(exc): if isinstance(exc, UnicodeEncodeError): return (repl, exc.end) raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.replacing", handle) for enc, input, repl in ( ("ascii", "[¤]", "abc"), ("iso-8859-1", "[€]", "½¾"), ("iso-8859-15", "[¤]", "œŸ"), ): res = input.encode(enc, "test.replacing") self.assertEqual(res, ("[" + repl + "]").encode(enc)) for enc, input, repl in ( ("utf-8", "[\udc80]", "\U0001f40d"), ("utf-16", "[\udc80]", "\U0001f40d"), ("utf-32", "[\udc80]", "\U0001f40d"), ): with self.subTest(encoding=enc): with self.assertRaises(UnicodeEncodeError) as cm: input.encode(enc, "test.replacing") exc = cm.exception self.assertEqual(exc.start, 1) self.assertEqual(exc.end, 2) self.assertEqual(exc.object, input) def test_encode_unencodable_replacement(self): def unencrepl(exc): if isinstance(exc, UnicodeEncodeError): return (repl, exc.end) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.unencreplhandler", unencrepl) for enc, input, repl in ( ("ascii", "[¤]", "½"), ("iso-8859-1", "[€]", "œ"), ("iso-8859-15", "[¤]", "½"), ("utf-8", "[\udc80]", "\udcff"), ("utf-16", "[\udc80]", "\udcff"), ("utf-32", "[\udc80]", "\udcff"), ): with self.subTest(encoding=enc): with self.assertRaises(UnicodeEncodeError) as cm: input.encode(enc, "test.unencreplhandler") exc = cm.exception self.assertEqual(exc.start, 1) self.assertEqual(exc.end, 2) self.assertEqual(exc.object, input) def test_encode_bytes_replacement(self): def handle(exc): if isinstance(exc, UnicodeEncodeError): return (repl, exc.end) raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.replacing", handle) # It works even if the bytes sequence is not decodable. for enc, input, repl in ( ("ascii", "[¤]", b"\xbd\xbe"), ("iso-8859-1", "[€]", b"\xbd\xbe"), ("iso-8859-15", "[¤]", b"\xbd\xbe"), ("utf-8", "[\udc80]", b"\xbd\xbe"), ("utf-16le", "[\udc80]", b"\xbd\xbe"), ("utf-16be", "[\udc80]", b"\xbd\xbe"), ("utf-32le", "[\udc80]", b"\xbc\xbd\xbe\xbf"), ("utf-32be", "[\udc80]", b"\xbc\xbd\xbe\xbf"), ): with self.subTest(encoding=enc): res = input.encode(enc, "test.replacing") self.assertEqual(res, "[".encode(enc) + repl + "]".encode(enc)) def test_encode_odd_bytes_replacement(self): def handle(exc): if isinstance(exc, UnicodeEncodeError): return (repl, exc.end) raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.replacing", handle) input = "[\udc80]" # Tests in which the replacement bytestring contains not whole number # of code units. for enc, repl in ( *itertools.product(("utf-16le", "utf-16be"), [b"a", b"abc"]), *itertools.product(("utf-32le", "utf-32be"), [b"a", b"ab", b"abc", b"abcde"]), ): with self.subTest(encoding=enc, repl=repl): with self.assertRaises(UnicodeEncodeError) as cm: input.encode(enc, "test.replacing") exc = cm.exception self.assertEqual(exc.start, 1) self.assertEqual(exc.end, 2) self.assertEqual(exc.object, input) self.assertEqual(exc.reason, "surrogates not allowed") def test_badregistercall(self): # enhance coverage of: # Modules/_codecsmodule.c::register_error() # Python/codecs.c::PyCodec_RegisterError() self.assertRaises(TypeError, codecs.register_error, 42) self.assertRaises(TypeError, codecs.register_error, "test.dummy", 42) def test_badlookupcall(self): # enhance coverage of: # Modules/_codecsmodule.c::lookup_error() self.assertRaises(TypeError, codecs.lookup_error) def test_unknownhandler(self): # enhance coverage of: # Modules/_codecsmodule.c::lookup_error() self.assertRaises(LookupError, codecs.lookup_error, "test.unknown") def test_xmlcharrefvalues(self): # enhance coverage of: # Python/codecs.c::PyCodec_XMLCharRefReplaceErrors() # and inline implementations v = (1, 5, 10, 50, 100, 500, 1000, 5000, 10000, 50000, 100000, 500000, 1000000) s = "".join([chr(x) for x in v]) codecs.register_error("test.xmlcharrefreplace", codecs.xmlcharrefreplace_errors) for enc in ("ascii", "iso-8859-15"): for err in ("xmlcharrefreplace", "test.xmlcharrefreplace"): s.encode(enc, err) def test_decodehelper(self): # enhance coverage of: # Objects/unicodeobject.c::unicode_decode_call_errorhandler() # and callers self.assertRaises(LookupError, b"\xff".decode, "ascii", "test.unknown") def baddecodereturn1(exc): return 42 codecs.register_error("test.baddecodereturn1", baddecodereturn1) self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn1") self.assertRaises(TypeError, b"\\".decode, "unicode-escape", "test.baddecodereturn1") self.assertRaises(TypeError, b"\\x0".decode, "unicode-escape", "test.baddecodereturn1") self.assertRaises(TypeError, b"\\x0y".decode, "unicode-escape", "test.baddecodereturn1") self.assertRaises(TypeError, b"\\Uffffeeee".decode, "unicode-escape", "test.baddecodereturn1") self.assertRaises(TypeError, b"\\uyyyy".decode, "raw-unicode-escape", "test.baddecodereturn1") def baddecodereturn2(exc): return ("?", None) codecs.register_error("test.baddecodereturn2", baddecodereturn2) self.assertRaises(TypeError, b"\xff".decode, "ascii", "test.baddecodereturn2") handler = PosReturn() codecs.register_error("test.posreturn", handler.handle) # Valid negative position handler.pos = -1 self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0") # Valid negative position handler.pos = -2 self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?><?>") # Negative position out of bounds handler.pos = -3 self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn") # Valid positive position handler.pos = 1 self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0") # Largest valid positive position (one beyond end of input) handler.pos = 2 self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>") # Invalid positive position handler.pos = 3 self.assertRaises(IndexError, b"\xff0".decode, "ascii", "test.posreturn") # Restart at the "0" handler.pos = 6 self.assertEqual(b"\\uyyyy0".decode("raw-unicode-escape", "test.posreturn"), "<?>0") class D(dict): def __getitem__(self, key): raise ValueError self.assertRaises(UnicodeError, codecs.charmap_decode, b"\xff", "strict", {0xff: None}) self.assertRaises(ValueError, codecs.charmap_decode, b"\xff", "strict", D()) self.assertRaises(TypeError, codecs.charmap_decode, b"\xff", "strict", {0xff: sys.maxunicode+1}) def test_encodehelper(self): # enhance coverage of: # Objects/unicodeobject.c::unicode_encode_call_errorhandler() # and callers self.assertRaises(LookupError, "\xff".encode, "ascii", "test.unknown") def badencodereturn1(exc): return 42 codecs.register_error("test.badencodereturn1", badencodereturn1) self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn1") def badencodereturn2(exc): return ("?", None) codecs.register_error("test.badencodereturn2", badencodereturn2) self.assertRaises(TypeError, "\xff".encode, "ascii", "test.badencodereturn2") handler = PosReturn() codecs.register_error("test.posreturn", handler.handle) # Valid negative position handler.pos = -1 self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0") # Valid negative position handler.pos = -2 self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?><?>") # Negative position out of bounds handler.pos = -3 self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn") # Valid positive position handler.pos = 1 self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0") # Largest valid positive position (one beyond end of input handler.pos = 2 self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>") # Invalid positive position handler.pos = 3 self.assertRaises(IndexError, "\xff0".encode, "ascii", "test.posreturn") handler.pos = 0 class D(dict): def __getitem__(self, key): raise ValueError for err in ("strict", "replace", "xmlcharrefreplace", "backslashreplace", "namereplace", "test.posreturn"): self.assertRaises(UnicodeError, codecs.charmap_encode, "\xff", err, {0xff: None}) self.assertRaises(ValueError, codecs.charmap_encode, "\xff", err, D()) self.assertRaises(TypeError, codecs.charmap_encode, "\xff", err, {0xff: 300}) def test_decodehelper_bug36819(self): handler = RepeatedPosReturn("x") codecs.register_error("test.bug36819", handler.handle) testcases = [ ("ascii", b"\xff"), ("utf-8", b"\xff"), ("utf-16be", b'\xdc\x80'), ("utf-32be", b'\x00\x00\xdc\x80'), ("iso-8859-6", b"\xff"), ] for enc, bad in testcases: input = "abcd".encode(enc) + bad with self.subTest(encoding=enc): handler.count = 50 decoded = input.decode(enc, "test.bug36819") self.assertEqual(decoded, 'abcdx' * 51) def test_encodehelper_bug36819(self): handler = RepeatedPosReturn() codecs.register_error("test.bug36819", handler.handle) input = "abcd\udc80" encodings = ["ascii", "latin1", "utf-8", "utf-16", "utf-32"] # built-in encodings += ["iso-8859-15"] # charmap codec if sys.platform == 'win32': encodings = ["mbcs", "oem"] # code page codecs handler.repl = "\udcff" for enc in encodings: with self.subTest(encoding=enc): handler.count = 50 with self.assertRaises(UnicodeEncodeError) as cm: input.encode(enc, "test.bug36819") exc = cm.exception self.assertEqual(exc.start, 4) self.assertEqual(exc.end, 5) self.assertEqual(exc.object, input) if sys.platform == "win32": handler.count = 50 with self.assertRaises(UnicodeEncodeError) as cm: codecs.code_page_encode(437, input, "test.bug36819") exc = cm.exception self.assertEqual(exc.start, 4) self.assertEqual(exc.end, 5) self.assertEqual(exc.object, input) handler.repl = "x" for enc in encodings: with self.subTest(encoding=enc): # The interpreter should segfault after a handful of attempts. # 50 was chosen to try to ensure a segfault without a fix, # but not OOM a machine with one. handler.count = 50 encoded = input.encode(enc, "test.bug36819") self.assertEqual(encoded.decode(enc), "abcdx" * 51) if sys.platform == "win32": handler.count = 50 encoded = codecs.code_page_encode(437, input, "test.bug36819") self.assertEqual(encoded[0].decode(), "abcdx" * 51) self.assertEqual(encoded[1], len(input)) def test_translatehelper(self): # enhance coverage of: # Objects/unicodeobject.c::unicode_encode_call_errorhandler() # and callers # (Unfortunately the errors argument is not directly accessible # from Python, so we can't test that much) class D(dict): def __getitem__(self, key): raise ValueError #self.assertRaises(ValueError, "\xff".translate, D()) self.assertRaises(ValueError, "\xff".translate, {0xff: sys.maxunicode+1}) self.assertRaises(TypeError, "\xff".translate, {0xff: ()}) def test_bug828737(self): charmap = { ord("&"): "&", ord("<"): "<", ord(">"): ">", ord('"'): """, } for n in (1, 10, 100, 1000): text = 'abc<def>ghi'*n text.translate(charmap) def test_mutating_decode_handler(self): baddata = [ ("ascii", b"\xff"), ("utf-7", b"++"), ("utf-8", b"\xff"), ("utf-16", b"\xff"), ("utf-32", b"\xff"), ("unicode-escape", b"\\u123g"), ("raw-unicode-escape", b"\\u123g"), ] def replacing(exc): if isinstance(exc, UnicodeDecodeError): exc.object = 42 return ("\u4242", 0) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.replacing", replacing) for (encoding, data) in baddata: with self.assertRaises(TypeError): data.decode(encoding, "test.replacing") def mutating(exc): if isinstance(exc, UnicodeDecodeError): exc.object = b"" return ("\u4242", 0) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.mutating", mutating) # If the decoder doesn't pick up the modified input the following # will lead to an endless loop for (encoding, data) in baddata: self.assertEqual(data.decode(encoding, "test.mutating"), "\u4242") def test_mutating_decode_handler_unicode_escape(self): decode = codecs.unicode_escape_decode def mutating(exc): if isinstance(exc, UnicodeDecodeError): r = data.get(exc.object[:exc.end]) if r is not None: exc.object = r[0] + exc.object[exc.end:] return ('\u0404', r[1]) raise AssertionError("don't know how to handle %r" % exc) codecs.register_error('test.mutating2', mutating) data = { br'\x0': (b'\\', 0), br'\x3': (b'xxx\\', 3), br'\x5': (b'x\\', 1), } def check(input, expected, msg): with self.assertWarns(DeprecationWarning) as cm: self.assertEqual(decode(input, 'test.mutating2'), (expected, len(input))) self.assertIn(msg, str(cm.warning)) check(br'\x0n\z', '\u0404\n\\z', r"invalid escape sequence '\z'") check(br'\x0z', '\u0404\\z', r"invalid escape sequence '\z'") check(br'\x3n\zr', '\u0404\n\\zr', r"invalid escape sequence '\z'") check(br'\x3zr', '\u0404\\zr', r"invalid escape sequence '\z'") check(br'\x3z5', '\u0404\\z5', r"invalid escape sequence '\z'") check(memoryview(br'\x3z5x')[:-1], '\u0404\\z5', r"invalid escape sequence '\z'") check(memoryview(br'\x3z5xy')[:-2], '\u0404\\z5', r"invalid escape sequence '\z'") check(br'\x5n\z', '\u0404\n\\z', r"invalid escape sequence '\z'") check(br'\x5z', '\u0404\\z', r"invalid escape sequence '\z'") check(memoryview(br'\x5zy')[:-1], '\u0404\\z', r"invalid escape sequence '\z'") # issue32583 def test_crashing_decode_handler(self): # better generating one more character to fill the extra space slot # so in debug build it can steadily fail def forward_shorter_than_end(exc): if isinstance(exc, UnicodeDecodeError): # size one character, 0 < forward < exc.end return ('\ufffd', exc.start+1) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error( "test.forward_shorter_than_end", forward_shorter_than_end) self.assertEqual( b'\xd8\xd8\xd8\xd8\xd8\x00\x00\x00'.decode( 'utf-16-le', 'test.forward_shorter_than_end'), '\ufffd\ufffd\ufffd\ufffd\xd8\x00' ) self.assertEqual( b'\xd8\xd8\xd8\xd8\x00\xd8\x00\x00'.decode( 'utf-16-be', 'test.forward_shorter_than_end'), '\ufffd\ufffd\ufffd\ufffd\xd8\x00' ) self.assertEqual( b'\x11\x11\x11\x11\x11\x00\x00\x00\x00\x00\x00'.decode( 'utf-32-le', 'test.forward_shorter_than_end'), '\ufffd\ufffd\ufffd\u1111\x00' ) self.assertEqual( b'\x11\x11\x11\x00\x00\x11\x11\x00\x00\x00\x00'.decode( 'utf-32-be', 'test.forward_shorter_than_end'), '\ufffd\ufffd\ufffd\u1111\x00' ) def replace_with_long(exc): if isinstance(exc, UnicodeDecodeError): exc.object = b"\x00" * 8 return ('\ufffd', exc.start) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error("test.replace_with_long", replace_with_long) self.assertEqual( b'\x00'.decode('utf-16', 'test.replace_with_long'), '\ufffd\x00\x00\x00\x00' ) self.assertEqual( b'\x00'.decode('utf-32', 'test.replace_with_long'), '\ufffd\x00\x00' ) def test_fake_error_class(self): handlers = [ codecs.strict_errors, codecs.ignore_errors, codecs.replace_errors, codecs.backslashreplace_errors, codecs.namereplace_errors, codecs.xmlcharrefreplace_errors, codecs.lookup_error('surrogateescape'), codecs.lookup_error('surrogatepass'), ] for cls in UnicodeEncodeError, UnicodeDecodeError, UnicodeTranslateError: class FakeUnicodeError(str): __class__ = cls for handler in handlers: with self.subTest(handler=handler, error_class=cls): self.assertRaises(TypeError, handler, FakeUnicodeError()) class FakeUnicodeError(Exception): __class__ = cls for handler in handlers: with self.subTest(handler=handler, error_class=cls): with self.assertRaises((TypeError, FakeUnicodeError)): handler(FakeUnicodeError()) if __name__ == "__main__": unittest.main()