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 collections import collections.abc import gc import pickle import random import string import sys import unittest import weakref from test import support class DictTest(unittest.TestCase): def test_invalid_keyword_arguments(self): class Custom(dict): pass for invalid in {1 : 2}, Custom({1 : 2}): with self.assertRaises(TypeError): dict(**invalid) with self.assertRaises(TypeError): {}.update(**invalid) def test_constructor(self): # calling built-in types without argument must return empty self.assertEqual(dict(), {}) self.assertIsNot(dict(), {}) def test_literal_constructor(self): # check literal constructor for different sized dicts # (to exercise the BUILD_MAP oparg). for n in (0, 1, 6, 256, 400): items = [(''.join(random.sample(string.ascii_letters, 8)), i) for i in range(n)] random.shuffle(items) formatted_items = ('{!r}: {:d}'.format(k, v) for k, v in items) dictliteral = '{' + ', '.join(formatted_items) + '}' self.assertEqual(eval(dictliteral), dict(items)) def test_merge_operator(self): a = {0: 0, 1: 1, 2: 1} b = {1: 1, 2: 2, 3: 3} c = a.copy() c |= b self.assertEqual(a | b, {0: 0, 1: 1, 2: 2, 3: 3}) self.assertEqual(c, {0: 0, 1: 1, 2: 2, 3: 3}) c = b.copy() c |= a self.assertEqual(b | a, {1: 1, 2: 1, 3: 3, 0: 0}) self.assertEqual(c, {1: 1, 2: 1, 3: 3, 0: 0}) c = a.copy() c |= [(1, 1), (2, 2), (3, 3)] self.assertEqual(c, {0: 0, 1: 1, 2: 2, 3: 3}) self.assertIs(a.__or__(None), NotImplemented) self.assertIs(a.__or__(()), NotImplemented) self.assertIs(a.__or__("BAD"), NotImplemented) self.assertIs(a.__or__(""), NotImplemented) self.assertRaises(TypeError, a.__ior__, None) self.assertEqual(a.__ior__(()), {0: 0, 1: 1, 2: 1}) self.assertRaises(ValueError, a.__ior__, "BAD") self.assertEqual(a.__ior__(""), {0: 0, 1: 1, 2: 1}) def test_bool(self): self.assertIs(not {}, True) self.assertTrue({1: 2}) self.assertIs(bool({}), False) self.assertIs(bool({1: 2}), True) def test_keys(self): d = {} self.assertEqual(set(d.keys()), set()) d = {'a': 1, 'b': 2} k = d.keys() self.assertEqual(set(k), {'a', 'b'}) self.assertIn('a', k) self.assertIn('b', k) self.assertIn('a', d) self.assertIn('b', d) self.assertRaises(TypeError, d.keys, None) self.assertEqual(repr(dict(a=1).keys()), "dict_keys(['a'])") def test_values(self): d = {} self.assertEqual(set(d.values()), set()) d = {1:2} self.assertEqual(set(d.values()), {2}) self.assertRaises(TypeError, d.values, None) self.assertEqual(repr(dict(a=1).values()), "dict_values([1])") def test_items(self): d = {} self.assertEqual(set(d.items()), set()) d = {1:2} self.assertEqual(set(d.items()), {(1, 2)}) self.assertRaises(TypeError, d.items, None) self.assertEqual(repr(dict(a=1).items()), "dict_items([('a', 1)])") def test_contains(self): d = {} self.assertNotIn('a', d) self.assertFalse('a' in d) self.assertTrue('a' not in d) d = {'a': 1, 'b': 2} self.assertIn('a', d) self.assertIn('b', d) self.assertNotIn('c', d) self.assertRaises(TypeError, d.__contains__) def test_len(self): d = {} self.assertEqual(len(d), 0) d = {'a': 1, 'b': 2} self.assertEqual(len(d), 2) def test_getitem(self): d = {'a': 1, 'b': 2} self.assertEqual(d['a'], 1) self.assertEqual(d['b'], 2) d['c'] = 3 d['a'] = 4 self.assertEqual(d['c'], 3) self.assertEqual(d['a'], 4) del d['b'] self.assertEqual(d, {'a': 4, 'c': 3}) self.assertRaises(TypeError, d.__getitem__) class BadEq(object): def __eq__(self, other): raise Exc() def __hash__(self): return 24 d = {} d[BadEq()] = 42 self.assertRaises(KeyError, d.__getitem__, 23) class Exc(Exception): pass class BadHash(object): fail = False def __hash__(self): if self.fail: raise Exc() else: return 42 x = BadHash() d[x] = 42 x.fail = True self.assertRaises(Exc, d.__getitem__, x) def test_clear(self): d = {1:1, 2:2, 3:3} d.clear() self.assertEqual(d, {}) self.assertRaises(TypeError, d.clear, None) def test_update(self): d = {} d.update({1:100}) d.update({2:20}) d.update({1:1, 2:2, 3:3}) self.assertEqual(d, {1:1, 2:2, 3:3}) d.update() self.assertEqual(d, {1:1, 2:2, 3:3}) self.assertRaises((TypeError, AttributeError), d.update, None) class SimpleUserDict: def __init__(self): self.d = {1:1, 2:2, 3:3} def keys(self): return self.d.keys() def __getitem__(self, i): return self.d[i] d.clear() d.update(SimpleUserDict()) self.assertEqual(d, {1:1, 2:2, 3:3}) class Exc(Exception): pass d.clear() class FailingUserDict: def keys(self): raise Exc self.assertRaises(Exc, d.update, FailingUserDict()) class FailingUserDict: def keys(self): class BogonIter: def __init__(self): self.i = 1 def __iter__(self): return self def __next__(self): if self.i: self.i = 0 return 'a' raise Exc return BogonIter() def __getitem__(self, key): return key self.assertRaises(Exc, d.update, FailingUserDict()) class FailingUserDict: def keys(self): class BogonIter: def __init__(self): self.i = ord('a') def __iter__(self): return self def __next__(self): if self.i <= ord('z'): rtn = chr(self.i) self.i += 1 return rtn raise StopIteration return BogonIter() def __getitem__(self, key): raise Exc self.assertRaises(Exc, d.update, FailingUserDict()) class badseq(object): def __iter__(self): return self def __next__(self): raise Exc() self.assertRaises(Exc, {}.update, badseq()) self.assertRaises(ValueError, {}.update, [(1, 2, 3)]) def test_fromkeys(self): self.assertEqual(dict.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) d = {} self.assertIsNot(d.fromkeys('abc'), d) self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None}) self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0}) self.assertEqual(d.fromkeys([]), {}) def g(): yield 1 self.assertEqual(d.fromkeys(g()), {1:None}) self.assertRaises(TypeError, {}.fromkeys, 3) class dictlike(dict): pass self.assertEqual(dictlike.fromkeys('a'), {'a':None}) self.assertEqual(dictlike().fromkeys('a'), {'a':None}) self.assertIsInstance(dictlike.fromkeys('a'), dictlike) self.assertIsInstance(dictlike().fromkeys('a'), dictlike) class mydict(dict): def __new__(cls): return collections.UserDict() ud = mydict.fromkeys('ab') self.assertEqual(ud, {'a':None, 'b':None}) self.assertIsInstance(ud, collections.UserDict) self.assertRaises(TypeError, dict.fromkeys) class Exc(Exception): pass class baddict1(dict): def __init__(self): raise Exc() self.assertRaises(Exc, baddict1.fromkeys, [1]) class BadSeq(object): def __iter__(self): return self def __next__(self): raise Exc() self.assertRaises(Exc, dict.fromkeys, BadSeq()) class baddict2(dict): def __setitem__(self, key, value): raise Exc() self.assertRaises(Exc, baddict2.fromkeys, [1]) # test fast path for dictionary inputs d = dict(zip(range(6), range(6))) self.assertEqual(dict.fromkeys(d, 0), dict(zip(range(6), [0]*6))) class baddict3(dict): def __new__(cls): return d d = {i : i for i in range(10)} res = d.copy() res.update(a=None, b=None, c=None) self.assertEqual(baddict3.fromkeys({"a", "b", "c"}), res) def test_copy(self): d = {1: 1, 2: 2, 3: 3} self.assertIsNot(d.copy(), d) self.assertEqual(d.copy(), d) self.assertEqual(d.copy(), {1: 1, 2: 2, 3: 3}) copy = d.copy() d[4] = 4 self.assertNotEqual(copy, d) self.assertEqual({}.copy(), {}) self.assertRaises(TypeError, d.copy, None) def test_copy_fuzz(self): for dict_size in [10, 100, 1000, 10000, 100000]: dict_size = random.randrange( dict_size // 2, dict_size + dict_size // 2) with self.subTest(dict_size=dict_size): d = {} for i in range(dict_size): d[i] = i d2 = d.copy() self.assertIsNot(d2, d) self.assertEqual(d, d2) d2['key'] = 'value' self.assertNotEqual(d, d2) self.assertEqual(len(d2), len(d) + 1) def test_copy_maintains_tracking(self): class A: pass key = A() for d in ({}, {'a': 1}, {key: 'val'}): d2 = d.copy() self.assertEqual(gc.is_tracked(d), gc.is_tracked(d2)) def test_copy_noncompact(self): # Dicts don't compact themselves on del/pop operations. # Copy will use a slow merging strategy that produces # a compacted copy when roughly 33% of dict is a non-used # keys-space (to optimize memory footprint). # In this test we want to hit the slow/compacting # branch of dict.copy() and make sure it works OK. d = {k: k for k in range(1000)} for k in range(950): del d[k] d2 = d.copy() self.assertEqual(d2, d) def test_get(self): d = {} self.assertIs(d.get('c'), None) self.assertEqual(d.get('c', 3), 3) d = {'a': 1, 'b': 2} self.assertIs(d.get('c'), None) self.assertEqual(d.get('c', 3), 3) self.assertEqual(d.get('a'), 1) self.assertEqual(d.get('a', 3), 1) self.assertRaises(TypeError, d.get) self.assertRaises(TypeError, d.get, None, None, None) def test_setdefault(self): # dict.setdefault() d = {} self.assertIs(d.setdefault('key0'), None) d.setdefault('key0', []) self.assertIs(d.setdefault('key0'), None) d.setdefault('key', []).append(3) self.assertEqual(d['key'][0], 3) d.setdefault('key', []).append(4) self.assertEqual(len(d['key']), 2) self.assertRaises(TypeError, d.setdefault) class Exc(Exception): pass class BadHash(object): fail = False def __hash__(self): if self.fail: raise Exc() else: return 42 x = BadHash() d[x] = 42 x.fail = True self.assertRaises(Exc, d.setdefault, x, []) def test_setdefault_atomic(self): # Issue #13521: setdefault() calls __hash__ and __eq__ only once. class Hashed(object): def __init__(self): self.hash_count = 0 self.eq_count = 0 def __hash__(self): self.hash_count += 1 return 42 def __eq__(self, other): self.eq_count += 1 return id(self) == id(other) hashed1 = Hashed() y = {hashed1: 5} hashed2 = Hashed() y.setdefault(hashed2, []) self.assertEqual(hashed1.hash_count, 1) self.assertEqual(hashed2.hash_count, 1) self.assertEqual(hashed1.eq_count + hashed2.eq_count, 1) def test_setitem_atomic_at_resize(self): class Hashed(object): def __init__(self): self.hash_count = 0 self.eq_count = 0 def __hash__(self): self.hash_count += 1 return 42 def __eq__(self, other): self.eq_count += 1 return id(self) == id(other) hashed1 = Hashed() # 5 items y = {hashed1: 5, 0: 0, 1: 1, 2: 2, 3: 3} hashed2 = Hashed() # 6th item forces a resize y[hashed2] = [] self.assertEqual(hashed1.hash_count, 1) self.assertEqual(hashed2.hash_count, 1) self.assertEqual(hashed1.eq_count + hashed2.eq_count, 1) def test_popitem(self): # dict.popitem() for copymode in -1, +1: # -1: b has same structure as a # +1: b is a.copy() for log2size in range(12): size = 2**log2size a = {} b = {} for i in range(size): a[repr(i)] = i if copymode < 0: b[repr(i)] = i if copymode > 0: b = a.copy() for i in range(size): ka, va = ta = a.popitem() self.assertEqual(va, int(ka)) kb, vb = tb = b.popitem() self.assertEqual(vb, int(kb)) self.assertFalse(copymode < 0 and ta != tb) self.assertFalse(a) self.assertFalse(b) d = {} self.assertRaises(KeyError, d.popitem) def test_pop(self): # Tests for pop with specified key d = {} k, v = 'abc', 'def' d[k] = v self.assertRaises(KeyError, d.pop, 'ghi') self.assertEqual(d.pop(k), v) self.assertEqual(len(d), 0) self.assertRaises(KeyError, d.pop, k) self.assertEqual(d.pop(k, v), v) d[k] = v self.assertEqual(d.pop(k, 1), v) self.assertRaises(TypeError, d.pop) class Exc(Exception): pass class BadHash(object): fail = False def __hash__(self): if self.fail: raise Exc() else: return 42 x = BadHash() d[x] = 42 x.fail = True self.assertRaises(Exc, d.pop, x) def test_mutating_iteration(self): # changing dict size during iteration d = {} d[1] = 1 with self.assertRaises(RuntimeError): for i in d: d[i+1] = 1 def test_mutating_iteration_delete(self): # change dict content during iteration d = {} d[0] = 0 with self.assertRaises(RuntimeError): for i in d: del d[0] d[0] = 0 def test_mutating_iteration_delete_over_values(self): # change dict content during iteration d = {} d[0] = 0 with self.assertRaises(RuntimeError): for i in d.values(): del d[0] d[0] = 0 def test_mutating_iteration_delete_over_items(self): # change dict content during iteration d = {} d[0] = 0 with self.assertRaises(RuntimeError): for i in d.items(): del d[0] d[0] = 0 def test_mutating_lookup(self): # changing dict during a lookup (issue #14417) class NastyKey: mutate_dict = None def __init__(self, value): self.value = value def __hash__(self): # hash collision! return 1 def __eq__(self, other): if NastyKey.mutate_dict: mydict, key = NastyKey.mutate_dict NastyKey.mutate_dict = None del mydict[key] return self.value == other.value key1 = NastyKey(1) key2 = NastyKey(2) d = {key1: 1} NastyKey.mutate_dict = (d, key1) d[key2] = 2 self.assertEqual(d, {key2: 2}) def test_repr(self): d = {} self.assertEqual(repr(d), '{}') d[1] = 2 self.assertEqual(repr(d), '{1: 2}') d = {} d[1] = d self.assertEqual(repr(d), '{1: {...}}') class Exc(Exception): pass class BadRepr(object): def __repr__(self): raise Exc() d = {1: BadRepr()} self.assertRaises(Exc, repr, d) def test_repr_deep(self): d = {} for i in range(sys.getrecursionlimit() + 100): d = {1: d} self.assertRaises(RecursionError, repr, d) def test_eq(self): self.assertEqual({}, {}) self.assertEqual({1: 2}, {1: 2}) class Exc(Exception): pass class BadCmp(object): def __eq__(self, other): raise Exc() def __hash__(self): return 1 d1 = {BadCmp(): 1} d2 = {1: 1} with self.assertRaises(Exc): d1 == d2 def test_keys_contained(self): self.helper_keys_contained(lambda x: x.keys()) self.helper_keys_contained(lambda x: x.items()) def helper_keys_contained(self, fn): # Test rich comparisons against dict key views, which should behave the # same as sets. empty = fn(dict()) empty2 = fn(dict()) smaller = fn({1:1, 2:2}) larger = fn({1:1, 2:2, 3:3}) larger2 = fn({1:1, 2:2, 3:3}) larger3 = fn({4:1, 2:2, 3:3}) self.assertTrue(smaller < larger) self.assertTrue(smaller <= larger) self.assertTrue(larger > smaller) self.assertTrue(larger >= smaller) self.assertFalse(smaller >= larger) self.assertFalse(smaller > larger) self.assertFalse(larger <= smaller) self.assertFalse(larger < smaller) self.assertFalse(smaller < larger3) self.assertFalse(smaller <= larger3) self.assertFalse(larger3 > smaller) self.assertFalse(larger3 >= smaller) # Inequality strictness self.assertTrue(larger2 >= larger) self.assertTrue(larger2 <= larger) self.assertFalse(larger2 > larger) self.assertFalse(larger2 < larger) self.assertTrue(larger == larger2) self.assertTrue(smaller != larger) # There is an optimization on the zero-element case. self.assertTrue(empty == empty2) self.assertFalse(empty != empty2) self.assertFalse(empty == smaller) self.assertTrue(empty != smaller) # With the same size, an elementwise compare happens self.assertTrue(larger != larger3) self.assertFalse(larger == larger3) def test_errors_in_view_containment_check(self): class C: def __eq__(self, other): raise RuntimeError d1 = {1: C()} d2 = {1: C()} with self.assertRaises(RuntimeError): d1.items() == d2.items() with self.assertRaises(RuntimeError): d1.items() != d2.items() with self.assertRaises(RuntimeError): d1.items() <= d2.items() with self.assertRaises(RuntimeError): d1.items() >= d2.items() d3 = {1: C(), 2: C()} with self.assertRaises(RuntimeError): d2.items() < d3.items() with self.assertRaises(RuntimeError): d3.items() > d2.items() def test_dictview_set_operations_on_keys(self): k1 = {1:1, 2:2}.keys() k2 = {1:1, 2:2, 3:3}.keys() k3 = {4:4}.keys() self.assertEqual(k1 - k2, set()) self.assertEqual(k1 - k3, {1,2}) self.assertEqual(k2 - k1, {3}) self.assertEqual(k3 - k1, {4}) self.assertEqual(k1 & k2, {1,2}) self.assertEqual(k1 & k3, set()) self.assertEqual(k1 | k2, {1,2,3}) self.assertEqual(k1 ^ k2, {3}) self.assertEqual(k1 ^ k3, {1,2,4}) def test_dictview_set_operations_on_items(self): k1 = {1:1, 2:2}.items() k2 = {1:1, 2:2, 3:3}.items() k3 = {4:4}.items() self.assertEqual(k1 - k2, set()) self.assertEqual(k1 - k3, {(1,1), (2,2)}) self.assertEqual(k2 - k1, {(3,3)}) self.assertEqual(k3 - k1, {(4,4)}) self.assertEqual(k1 & k2, {(1,1), (2,2)}) self.assertEqual(k1 & k3, set()) self.assertEqual(k1 | k2, {(1,1), (2,2), (3,3)}) self.assertEqual(k1 ^ k2, {(3,3)}) self.assertEqual(k1 ^ k3, {(1,1), (2,2), (4,4)}) def test_dictview_mixed_set_operations(self): # Just a few for .keys() self.assertTrue({1:1}.keys() == {1}) self.assertTrue({1} == {1:1}.keys()) self.assertEqual({1:1}.keys() | {2}, {1, 2}) self.assertEqual({2} | {1:1}.keys(), {1, 2}) # And a few for .items() self.assertTrue({1:1}.items() == {(1,1)}) self.assertTrue({(1,1)} == {1:1}.items()) self.assertEqual({1:1}.items() | {2}, {(1,1), 2}) self.assertEqual({2} | {1:1}.items(), {(1,1), 2}) def test_missing(self): # Make sure dict doesn't have a __missing__ method self.assertFalse(hasattr(dict, "__missing__")) self.assertFalse(hasattr({}, "__missing__")) # Test several cases: # (D) subclass defines __missing__ method returning a value # (E) subclass defines __missing__ method raising RuntimeError # (F) subclass sets __missing__ instance variable (no effect) # (G) subclass doesn't define __missing__ at all class D(dict): def __missing__(self, key): return 42 d = D({1: 2, 3: 4}) self.assertEqual(d[1], 2) self.assertEqual(d[3], 4) self.assertNotIn(2, d) self.assertNotIn(2, d.keys()) self.assertEqual(d[2], 42) class E(dict): def __missing__(self, key): raise RuntimeError(key) e = E() with self.assertRaises(RuntimeError) as c: e[42] self.assertEqual(c.exception.args, (42,)) class F(dict): def __init__(self): # An instance variable __missing__ should have no effect self.__missing__ = lambda key: None f = F() with self.assertRaises(KeyError) as c: f[42] self.assertEqual(c.exception.args, (42,)) class G(dict): pass g = G() with self.assertRaises(KeyError) as c: g[42] self.assertEqual(c.exception.args, (42,)) def test_tuple_keyerror(self): # SF #1576657 d = {} with self.assertRaises(KeyError) as c: d[(1,)] self.assertEqual(c.exception.args, ((1,),)) def test_bad_key(self): # Dictionary lookups should fail if __eq__() raises an exception. class CustomException(Exception): pass class BadDictKey: def __hash__(self): return hash(self.__class__) def __eq__(self, other): if isinstance(other, self.__class__): raise CustomException return other d = {} x1 = BadDictKey() x2 = BadDictKey() d[x1] = 1 for stmt in ['d[x2] = 2', 'z = d[x2]', 'x2 in d', 'd.get(x2)', 'd.setdefault(x2, 42)', 'd.pop(x2)', 'd.update({x2: 2})']: with self.assertRaises(CustomException): exec(stmt, locals()) def test_resize1(self): # Dict resizing bug, found by Jack Jansen in 2.2 CVS development. # This version got an assert failure in debug build, infinite loop in # release build. Unfortunately, provoking this kind of stuff requires # a mix of inserts and deletes hitting exactly the right hash codes in # exactly the right order, and I can't think of a randomized approach # that would be *likely* to hit a failing case in reasonable time. d = {} for i in range(5): d[i] = i for i in range(5): del d[i] for i in range(5, 9): # i==8 was the problem d[i] = i def test_resize2(self): # Another dict resizing bug (SF bug #1456209). # This caused Segmentation faults or Illegal instructions. class X(object): def __hash__(self): return 5 def __eq__(self, other): if resizing: d.clear() return False d = {} resizing = False d[X()] = 1 d[X()] = 2 d[X()] = 3 d[X()] = 4 d[X()] = 5 # now trigger a resize resizing = True d[9] = 6 def test_empty_presized_dict_in_freelist(self): # Bug #3537: if an empty but presized dict with a size larger # than 7 was in the freelist, it triggered an assertion failure with self.assertRaises(ZeroDivisionError): d = {'a': 1 // 0, 'b': None, 'c': None, 'd': None, 'e': None, 'f': None, 'g': None, 'h': None} d = {} def test_container_iterator(self): # Bug #3680: tp_traverse was not implemented for dictiter and # dictview objects. class C(object): pass views = (dict.items, dict.values, dict.keys) for v in views: obj = C() ref = weakref.ref(obj) container = {obj: 1} obj.v = v(container) obj.x = iter(obj.v) del obj, container gc.collect() self.assertIs(ref(), None, "Cycle was not collected") def _not_tracked(self, t): # Nested containers can take several collections to untrack gc.collect() gc.collect() self.assertFalse(gc.is_tracked(t), t) def _tracked(self, t): self.assertTrue(gc.is_tracked(t), t) gc.collect() gc.collect() self.assertTrue(gc.is_tracked(t), t) @support.cpython_only def test_track_literals(self): # Test GC-optimization of dict literals x, y, z, w = 1.5, "a", (1, None), [] self._not_tracked({}) self._not_tracked({x:(), y:x, z:1}) self._not_tracked({1: "a", "b": 2}) self._not_tracked({1: 2, (None, True, False, ()): int}) self._not_tracked({1: object()}) # Dicts with mutable elements are always tracked, even if those # elements are not tracked right now. self._tracked({1: []}) self._tracked({1: ([],)}) self._tracked({1: {}}) self._tracked({1: set()}) @support.cpython_only def test_track_dynamic(self): # Test GC-optimization of dynamically-created dicts class MyObject(object): pass x, y, z, w, o = 1.5, "a", (1, object()), [], MyObject() d = dict() self._not_tracked(d) d[1] = "a" self._not_tracked(d) d[y] = 2 self._not_tracked(d) d[z] = 3 self._not_tracked(d) self._not_tracked(d.copy()) d[4] = w self._tracked(d) self._tracked(d.copy()) d[4] = None self._not_tracked(d) self._not_tracked(d.copy()) # dd isn't tracked right now, but it may mutate and therefore d # which contains it must be tracked. d = dict() dd = dict() d[1] = dd self._not_tracked(dd) self._tracked(d) dd[1] = d self._tracked(dd) d = dict.fromkeys([x, y, z]) self._not_tracked(d) dd = dict() dd.update(d) self._not_tracked(dd) d = dict.fromkeys([x, y, z, o]) self._tracked(d) dd = dict() dd.update(d) self._tracked(dd) d = dict(x=x, y=y, z=z) self._not_tracked(d) d = dict(x=x, y=y, z=z, w=w) self._tracked(d) d = dict() d.update(x=x, y=y, z=z) self._not_tracked(d) d.update(w=w) self._tracked(d) d = dict([(x, y), (z, 1)]) self._not_tracked(d) d = dict([(x, y), (z, w)]) self._tracked(d) d = dict() d.update([(x, y), (z, 1)]) self._not_tracked(d) d.update([(x, y), (z, w)]) self._tracked(d) @support.cpython_only def test_track_subtypes(self): # Dict subtypes are always tracked class MyDict(dict): pass self._tracked(MyDict()) def make_shared_key_dict(self, n): class C: pass dicts = [] for i in range(n): a = C() a.x, a.y, a.z = 1, 2, 3 dicts.append(a.__dict__) return dicts @support.cpython_only def test_splittable_setdefault(self): """split table must be combined when setdefault() breaks insertion order""" a, b = self.make_shared_key_dict(2) a['a'] = 1 size_a = sys.getsizeof(a) a['b'] = 2 b.setdefault('b', 2) size_b = sys.getsizeof(b) b['a'] = 1 self.assertGreater(size_b, size_a) self.assertEqual(list(a), ['x', 'y', 'z', 'a', 'b']) self.assertEqual(list(b), ['x', 'y', 'z', 'b', 'a']) @support.cpython_only def test_splittable_del(self): """split table must be combined when del d[k]""" a, b = self.make_shared_key_dict(2) orig_size = sys.getsizeof(a) del a['y'] # split table is combined with self.assertRaises(KeyError): del a['y'] self.assertGreater(sys.getsizeof(a), orig_size) self.assertEqual(list(a), ['x', 'z']) self.assertEqual(list(b), ['x', 'y', 'z']) # Two dicts have different insertion order. a['y'] = 42 self.assertEqual(list(a), ['x', 'z', 'y']) self.assertEqual(list(b), ['x', 'y', 'z']) @support.cpython_only def test_splittable_pop(self): """split table must be combined when d.pop(k)""" a, b = self.make_shared_key_dict(2) orig_size = sys.getsizeof(a) a.pop('y') # split table is combined with self.assertRaises(KeyError): a.pop('y') self.assertGreater(sys.getsizeof(a), orig_size) self.assertEqual(list(a), ['x', 'z']) self.assertEqual(list(b), ['x', 'y', 'z']) # Two dicts have different insertion order. a['y'] = 42 self.assertEqual(list(a), ['x', 'z', 'y']) self.assertEqual(list(b), ['x', 'y', 'z']) @support.cpython_only def test_splittable_pop_pending(self): """pop a pending key in a split table should not crash""" a, b = self.make_shared_key_dict(2) a['a'] = 4 with self.assertRaises(KeyError): b.pop('a') @support.cpython_only def test_splittable_popitem(self): """split table must be combined when d.popitem()""" a, b = self.make_shared_key_dict(2) orig_size = sys.getsizeof(a) item = a.popitem() # split table is combined self.assertEqual(item, ('z', 3)) with self.assertRaises(KeyError): del a['z'] self.assertGreater(sys.getsizeof(a), orig_size) self.assertEqual(list(a), ['x', 'y']) self.assertEqual(list(b), ['x', 'y', 'z']) @support.cpython_only def test_splittable_setattr_after_pop(self): """setattr() must not convert combined table into split table.""" # Issue 28147 import _testcapi class C: pass a = C() a.a = 1 self.assertTrue(_testcapi.dict_hassplittable(a.__dict__)) # dict.pop() convert it to combined table a.__dict__.pop('a') self.assertFalse(_testcapi.dict_hassplittable(a.__dict__)) # But C should not convert a.__dict__ to split table again. a.a = 1 self.assertFalse(_testcapi.dict_hassplittable(a.__dict__)) # Same for popitem() a = C() a.a = 2 self.assertTrue(_testcapi.dict_hassplittable(a.__dict__)) a.__dict__.popitem() self.assertFalse(_testcapi.dict_hassplittable(a.__dict__)) a.a = 3 self.assertFalse(_testcapi.dict_hassplittable(a.__dict__)) def test_iterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} it = iter(data) d = pickle.dumps(it, proto) it = pickle.loads(d) self.assertEqual(list(it), list(data)) it = pickle.loads(d) try: drop = next(it) except StopIteration: continue d = pickle.dumps(it, proto) it = pickle.loads(d) del data[drop] self.assertEqual(list(it), list(data)) def test_itemiterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} # dictviews aren't picklable, only their iterators itorg = iter(data.items()) d = pickle.dumps(itorg, proto) it = pickle.loads(d) # note that the type of the unpickled iterator # is not necessarily the same as the original. It is # merely an object supporting the iterator protocol, yielding # the same objects as the original one. # self.assertEqual(type(itorg), type(it)) self.assertIsInstance(it, collections.abc.Iterator) self.assertEqual(dict(it), data) it = pickle.loads(d) drop = next(it) d = pickle.dumps(it, proto) it = pickle.loads(d) del data[drop[0]] self.assertEqual(dict(it), data) def test_valuesiterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} # data.values() isn't picklable, only its iterator it = iter(data.values()) d = pickle.dumps(it, proto) it = pickle.loads(d) self.assertEqual(list(it), list(data.values())) it = pickle.loads(d) drop = next(it) d = pickle.dumps(it, proto) it = pickle.loads(d) values = list(it) + [drop] self.assertEqual(sorted(values), sorted(list(data.values()))) def test_reverseiterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} it = reversed(data) d = pickle.dumps(it, proto) it = pickle.loads(d) self.assertEqual(list(it), list(reversed(data))) it = pickle.loads(d) try: drop = next(it) except StopIteration: continue d = pickle.dumps(it, proto) it = pickle.loads(d) del data[drop] self.assertEqual(list(it), list(reversed(data))) def test_reverseitemiterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} # dictviews aren't picklable, only their iterators itorg = reversed(data.items()) d = pickle.dumps(itorg, proto) it = pickle.loads(d) # note that the type of the unpickled iterator # is not necessarily the same as the original. It is # merely an object supporting the iterator protocol, yielding # the same objects as the original one. # self.assertEqual(type(itorg), type(it)) self.assertIsInstance(it, collections.abc.Iterator) self.assertEqual(dict(it), data) it = pickle.loads(d) drop = next(it) d = pickle.dumps(it, proto) it = pickle.loads(d) del data[drop[0]] self.assertEqual(dict(it), data) def test_reversevaluesiterator_pickling(self): for proto in range(pickle.HIGHEST_PROTOCOL + 1): data = {1:"a", 2:"b", 3:"c"} # data.values() isn't picklable, only its iterator it = reversed(data.values()) d = pickle.dumps(it, proto) it = pickle.loads(d) self.assertEqual(list(it), list(reversed(data.values()))) it = pickle.loads(d) drop = next(it) d = pickle.dumps(it, proto) it = pickle.loads(d) values = list(it) + [drop] self.assertEqual(sorted(values), sorted(data.values())) def test_instance_dict_getattr_str_subclass(self): class Foo: def __init__(self, msg): self.msg = msg f = Foo('123') class _str(str): pass self.assertEqual(f.msg, getattr(f, _str('msg'))) self.assertEqual(f.msg, f.__dict__[_str('msg')]) def test_object_set_item_single_instance_non_str_key(self): class Foo: pass f = Foo() f.__dict__[1] = 1 f.a = 'a' self.assertEqual(f.__dict__, {1:1, 'a':'a'}) def check_reentrant_insertion(self, mutate): # This object will trigger mutation of the dict when replaced # by another value. Note this relies on refcounting: the test # won't achieve its purpose on fully-GCed Python implementations. class Mutating: def __del__(self): mutate(d) d = {k: Mutating() for k in 'abcdefghijklmnopqr'} for k in list(d): d[k] = k def test_reentrant_insertion(self): # Reentrant insertion shouldn't crash (see issue #22653) def mutate(d): d['b'] = 5 self.check_reentrant_insertion(mutate) def mutate(d): d.update(self.__dict__) d.clear() self.check_reentrant_insertion(mutate) def mutate(d): while d: d.popitem() self.check_reentrant_insertion(mutate) def test_merge_and_mutate(self): class X: def __hash__(self): return 0 def __eq__(self, o): other.clear() return False l = [(i,0) for i in range(1, 1337)] other = dict(l) other[X()] = 0 d = {X(): 0, 1: 1} self.assertRaises(RuntimeError, d.update, other) def test_free_after_iterating(self): support.check_free_after_iterating(self, iter, dict) support.check_free_after_iterating(self, lambda d: iter(d.keys()), dict) support.check_free_after_iterating(self, lambda d: iter(d.values()), dict) support.check_free_after_iterating(self, lambda d: iter(d.items()), dict) def test_equal_operator_modifying_operand(self): # test fix for seg fault reported in bpo-27945 part 3. class X(): def __del__(self): dict_b.clear() def __eq__(self, other): dict_a.clear() return True def __hash__(self): return 13 dict_a = {X(): 0} dict_b = {X(): X()} self.assertTrue(dict_a == dict_b) # test fix for seg fault reported in bpo-38588 part 1. class Y: def __eq__(self, other): dict_d.clear() return True dict_c = {0: Y()} dict_d = {0: set()} self.assertTrue(dict_c == dict_d) def test_fromkeys_operator_modifying_dict_operand(self): # test fix for seg fault reported in issue 27945 part 4a. class X(int): def __hash__(self): return 13 def __eq__(self, other): if len(d) > 1: d.clear() return False d = {} # this is required to exist so that d can be constructed! d = {X(1): 1, X(2): 2} try: dict.fromkeys(d) # shouldn't crash except RuntimeError: # implementation defined pass def test_fromkeys_operator_modifying_set_operand(self): # test fix for seg fault reported in issue 27945 part 4b. class X(int): def __hash__(self): return 13 def __eq__(self, other): if len(d) > 1: d.clear() return False d = {} # this is required to exist so that d can be constructed! d = {X(1), X(2)} try: dict.fromkeys(d) # shouldn't crash except RuntimeError: # implementation defined pass def test_dictitems_contains_use_after_free(self): class X: def __eq__(self, other): d.clear() return NotImplemented d = {0: set()} (0, X()) in d.items() def test_dict_contain_use_after_free(self): # bpo-40489 class S(str): def __eq__(self, other): d.clear() return NotImplemented def __hash__(self): return hash('test') d = {S(): 'value'} self.assertFalse('test' in d) def test_init_use_after_free(self): class X: def __hash__(self): pair[:] = [] return 13 pair = [X(), 123] dict([pair]) def test_oob_indexing_dictiter_iternextitem(self): class X(int): def __del__(self): d.clear() d = {i: X(i) for i in range(8)} def iter_and_mutate(): for result in d.items(): if result[0] == 2: d[2] = None # free d[2] --> X(2).__del__ was called self.assertRaises(RuntimeError, iter_and_mutate) def test_reversed(self): d = {"a": 1, "b": 2, "foo": 0, "c": 3, "d": 4} del d["foo"] r = reversed(d) self.assertEqual(list(r), list('dcba')) self.assertRaises(StopIteration, next, r) def test_reverse_iterator_for_empty_dict(self): # bpo-38525: reversed iterator should work properly # empty dict is directly used for reference count test self.assertEqual(list(reversed({})), []) self.assertEqual(list(reversed({}.items())), []) self.assertEqual(list(reversed({}.values())), []) self.assertEqual(list(reversed({}.keys())), []) # dict() and {} don't trigger the same code path self.assertEqual(list(reversed(dict())), []) self.assertEqual(list(reversed(dict().items())), []) self.assertEqual(list(reversed(dict().values())), []) self.assertEqual(list(reversed(dict().keys())), []) def test_reverse_iterator_for_shared_shared_dicts(self): class A: def __init__(self, x, y): if x: self.x = x if y: self.y = y self.assertEqual(list(reversed(A(1, 2).__dict__)), ['y', 'x']) self.assertEqual(list(reversed(A(1, 0).__dict__)), ['x']) self.assertEqual(list(reversed(A(0, 1).__dict__)), ['y']) def test_dict_copy_order(self): # bpo-34320 od = collections.OrderedDict([('a', 1), ('b', 2)]) od.move_to_end('a') expected = list(od.items()) copy = dict(od) self.assertEqual(list(copy.items()), expected) # dict subclass doesn't override __iter__ class CustomDict(dict): pass pairs = [('a', 1), ('b', 2), ('c', 3)] d = CustomDict(pairs) self.assertEqual(pairs, list(dict(d).items())) class CustomReversedDict(dict): def keys(self): return reversed(list(dict.keys(self))) __iter__ = keys def items(self): return reversed(dict.items(self)) d = CustomReversedDict(pairs) self.assertEqual(pairs[::-1], list(dict(d).items())) @support.cpython_only def test_dict_items_result_gc(self): # bpo-42536: dict.items's tuple-reuse speed trick breaks the GC's # assumptions about what can be untracked. Make sure we re-track result # tuples whenever we reuse them. it = iter({None: []}.items()) gc.collect() # That GC collection probably untracked the recycled internal result # tuple, which is initialized to (None, None). Make sure it's re-tracked # when it's mutated and returned from __next__: self.assertTrue(gc.is_tracked(next(it))) @support.cpython_only def test_dict_items_result_gc_reversed(self): # Same as test_dict_items_result_gc above, but reversed. it = reversed({None: []}.items()) gc.collect() self.assertTrue(gc.is_tracked(next(it))) class CAPITest(unittest.TestCase): # Test _PyDict_GetItem_KnownHash() @support.cpython_only def test_getitem_knownhash(self): from _testcapi import dict_getitem_knownhash d = {'x': 1, 'y': 2, 'z': 3} self.assertEqual(dict_getitem_knownhash(d, 'x', hash('x')), 1) self.assertEqual(dict_getitem_knownhash(d, 'y', hash('y')), 2) self.assertEqual(dict_getitem_knownhash(d, 'z', hash('z')), 3) # not a dict self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1)) # key does not exist self.assertRaises(KeyError, dict_getitem_knownhash, {}, 1, hash(1)) class Exc(Exception): pass class BadEq: def __eq__(self, other): raise Exc def __hash__(self): return 7 k1, k2 = BadEq(), BadEq() d = {k1: 1} self.assertEqual(dict_getitem_knownhash(d, k1, hash(k1)), 1) self.assertRaises(Exc, dict_getitem_knownhash, d, k2, hash(k2)) from test import mapping_tests class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol): type2test = dict class Dict(dict): pass class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol): type2test = Dict if __name__ == "__main__": unittest.main()