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.58
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
python35 /
lib64 /
python3.5 /
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
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
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_tools
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
test_warnings
[ 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
Sine-1000Hz-300ms.aif
60.25
KB
-rw-r--r--
2019-11-02 02:32
__init__.py
47
B
-rw-r--r--
2021-09-24 12:03
__main__.py
55
B
-rw-r--r--
2021-09-24 12:03
_test_multiprocessing.py
129.13
KB
-rw-r--r--
2021-09-24 12:03
allsans.pem
2.12
KB
-rw-r--r--
2019-11-02 02:32
audiotests.py
12.13
KB
-rw-r--r--
2021-09-24 12:03
autotest.py
211
B
-rw-r--r--
2021-09-24 12:03
bad_coding.py
24
B
-rw-r--r--
2021-09-24 12:03
bad_coding2.py
30
B
-rw-r--r--
2021-09-24 12:03
badcert.pem
1.88
KB
-rw-r--r--
2019-11-02 02:32
badkey.pem
2.11
KB
-rw-r--r--
2019-11-02 02:32
badsyntax_3131.py
32
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async1.py
45
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async2.py
45
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async3.py
44
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async4.py
27
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async5.py
33
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async6.py
27
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async7.py
35
B
-rw-r--r--
2021-09-24 12:03
badsyntax_async8.py
37
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future10.py
95
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future3.py
172
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future4.py
153
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future5.py
184
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future6.py
161
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future7.py
196
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future8.py
122
B
-rw-r--r--
2021-09-24 12:03
badsyntax_future9.py
142
B
-rw-r--r--
2021-09-24 12:03
badsyntax_pep3120.py
14
B
-rw-r--r--
2021-09-24 12:03
bisect.py
4.83
KB
-rwxr-xr-x
2021-09-24 12:03
bytecode_helper.py
1.56
KB
-rw-r--r--
2021-09-24 12:03
cfgparser.1
21
B
-rw-r--r--
2019-11-02 02:32
cfgparser.2
19.02
KB
-rw-r--r--
2019-11-02 02:32
cfgparser.3
1.55
KB
-rw-r--r--
2019-11-02 02:32
cmath_testcases.txt
133.86
KB
-rw-r--r--
2019-11-02 02:32
coding20731.py
18
B
-rw-r--r--
2021-09-24 12:03
curses_tests.py
1.22
KB
-rwxr-xr-x
2021-09-24 12:03
datetimetester.py
153.48
KB
-rw-r--r--
2021-09-24 12:03
dh1024.pem
300
B
-rw-r--r--
2019-11-02 02:32
dis_module.py
76
B
-rw-r--r--
2021-09-24 12:03
doctest_aliases.py
240
B
-rw-r--r--
2021-09-24 12:03
double_const.py
1.18
KB
-rw-r--r--
2021-09-24 12:03
empty.vbs
70
B
-rw-r--r--
2019-11-02 02:32
exception_hierarchy.txt
1.75
KB
-rw-r--r--
2019-11-02 02:32
final_a.py
411
B
-rw-r--r--
2021-09-24 12:03
final_b.py
411
B
-rw-r--r--
2021-09-24 12:03
floating_points.txt
15.92
KB
-rw-r--r--
2019-11-02 02:32
fork_wait.py
2.29
KB
-rw-r--r--
2021-09-24 12:03
formatfloat_testcases.txt
7.45
KB
-rw-r--r--
2019-11-02 02:32
future_test1.py
229
B
-rw-r--r--
2021-09-24 12:03
future_test2.py
149
B
-rw-r--r--
2021-09-24 12:03
gdb_sample.py
153
B
-rw-r--r--
2021-09-24 12:03
ieee754.txt
3.21
KB
-rw-r--r--
2019-11-02 02:32
imp_dummy.py
63
B
-rw-r--r--
2021-09-24 12:03
inspect_fodder.py
1.14
KB
-rw-r--r--
2021-09-24 12:03
inspect_fodder2.py
1.77
KB
-rw-r--r--
2021-09-24 12:03
keycert.passwd.pem
1.79
KB
-rw-r--r--
2019-11-02 02:32
keycert.pem
1.74
KB
-rw-r--r--
2019-11-02 02:32
keycert2.pem
1.75
KB
-rw-r--r--
2019-11-02 02:32
keycert3.pem
3.96
KB
-rw-r--r--
2019-11-02 02:32
keycert4.pem
3.96
KB
-rw-r--r--
2019-11-02 02:32
list_tests.py
17.96
KB
-rw-r--r--
2021-09-24 12:03
lock_tests.py
27.46
KB
-rw-r--r--
2021-09-24 12:03
mailcap.txt
1.24
KB
-rw-r--r--
2019-11-02 02:32
make_ssl_certs.py
6.63
KB
-rw-r--r--
2021-09-24 12:03
mapping_tests.py
21.49
KB
-rw-r--r--
2021-09-24 12:03
math_testcases.txt
23.19
KB
-rw-r--r--
2019-11-02 02:32
memory_watchdog.py
859
B
-rw-r--r--
2021-09-24 12:03
mime.types
47.37
KB
-rw-r--r--
2019-11-02 02:32
mock_socket.py
3.53
KB
-rw-r--r--
2021-09-24 12:03
mod_generics_cache.py
224
B
-rw-r--r--
2021-09-24 12:03
mp_fork_bomb.py
448
B
-rw-r--r--
2021-09-24 12:03
mp_preload.py
351
B
-rw-r--r--
2021-09-24 12:03
multibytecodec_support.py
14.44
KB
-rw-r--r--
2021-09-24 12:03
nokia.pem
1.88
KB
-rw-r--r--
2019-11-02 02:32
nullbytecert.pem
5.31
KB
-rw-r--r--
2019-11-02 02:32
nullcert.pem
0
B
-rw-r--r--
2019-11-02 02:32
outstanding_bugs.py
370
B
-rw-r--r--
2021-09-24 12:03
pickletester.py
100.52
KB
-rw-r--r--
2021-09-24 12:03
profilee.py
2.97
KB
-rw-r--r--
2021-09-24 12:03
pstats.pck
65.05
KB
-rw-r--r--
2019-11-02 02:32
pycacert.pem
4.21
KB
-rw-r--r--
2019-11-02 02:32
pycakey.pem
1.66
KB
-rw-r--r--
2019-11-02 02:32
pyclbr_input.py
648
B
-rw-r--r--
2021-09-24 12:03
pydoc_mod.py
708
B
-rw-r--r--
2021-09-24 12:03
pydocfodder.py
6.18
KB
-rw-r--r--
2021-09-24 12:03
pystone.py
7.56
KB
-rwxr-xr-x
2021-09-24 12:03
randv2_32.pck
7.34
KB
-rw-r--r--
2019-11-02 02:32
randv2_64.pck
7.19
KB
-rw-r--r--
2019-11-02 02:32
randv3.pck
7.82
KB
-rw-r--r--
2019-11-02 02:32
re_tests.py
31.05
KB
-rwxr-xr-x
2021-09-24 12:03
regrtest.py
67.22
KB
-rwxr-xr-x
2021-09-24 12:03
relimport.py
27
B
-rw-r--r--
2021-09-24 12:03
reperf.py
538
B
-rw-r--r--
2021-09-24 12:03
revocation.crl
625
B
-rw-r--r--
2019-11-02 02:32
sample_doctest.py
1.02
KB
-rw-r--r--
2021-09-24 12:03
sample_doctest_no_docstrings.py
227
B
-rw-r--r--
2021-09-24 12:03
sample_doctest_no_doctests.py
269
B
-rw-r--r--
2021-09-24 12:03
selfsigned_pythontestdotnet.pem
2.08
KB
-rw-r--r--
2019-11-02 02:32
seq_tests.py
14.08
KB
-rw-r--r--
2021-09-24 12:03
sgml_input.html
8.1
KB
-rw-r--r--
2019-11-02 02:32
sha256.pem
8.15
KB
-rw-r--r--
2019-11-02 02:32
sortperf.py
4.69
KB
-rw-r--r--
2021-09-24 12:03
ssl_cert.pem
867
B
-rw-r--r--
2019-11-02 02:32
ssl_key.passwd.pem
963
B
-rw-r--r--
2019-11-02 02:32
ssl_key.pem
916
B
-rw-r--r--
2019-11-02 02:32
ssl_servers.py
7.08
KB
-rw-r--r--
2021-09-24 12:03
ssltests.py
1.03
KB
-rw-r--r--
2021-09-24 12:03
string_tests.py
63.91
KB
-rw-r--r--
2021-09-24 12:03
talos-2019-0758.pem
1.3
KB
-rw-r--r--
2019-11-02 02:32
test___all__.py
3.72
KB
-rw-r--r--
2021-09-24 12:03
test___future__.py
2.36
KB
-rw-r--r--
2021-09-24 12:03
test__locale.py
7.72
KB
-rw-r--r--
2021-09-24 12:03
test__opcode.py
850
B
-rw-r--r--
2021-09-24 12:03
test__osx_support.py
11.4
KB
-rw-r--r--
2021-09-24 12:03
test_abc.py
13.33
KB
-rw-r--r--
2021-09-24 12:03
test_abstract_numbers.py
1.49
KB
-rw-r--r--
2021-09-24 12:03
test_aifc.py
15.98
KB
-rw-r--r--
2021-09-24 12:03
test_argparse.py
160.89
KB
-rw-r--r--
2021-09-24 12:03
test_array.py
46.68
KB
-rw-r--r--
2021-09-24 12:03
test_asdl_parser.py
3.92
KB
-rw-r--r--
2021-09-24 12:03
test_ast.py
43.83
KB
-rw-r--r--
2021-09-24 12:03
test_asynchat.py
11.25
KB
-rw-r--r--
2021-09-24 12:03
test_asyncore.py
25.95
KB
-rw-r--r--
2021-09-24 12:03
test_atexit.py
4.76
KB
-rw-r--r--
2021-09-24 12:03
test_audioop.py
28.05
KB
-rw-r--r--
2021-09-24 12:03
test_augassign.py
7.47
KB
-rw-r--r--
2021-09-24 12:03
test_base64.py
29.77
KB
-rw-r--r--
2021-09-24 12:03
test_bigaddrspace.py
2.92
KB
-rw-r--r--
2021-09-24 12:03
test_bigmem.py
44.18
KB
-rw-r--r--
2021-09-24 12:03
test_binascii.py
14.02
KB
-rw-r--r--
2021-09-24 12:03
test_binhex.py
1.47
KB
-rw-r--r--
2021-09-24 12:03
test_binop.py
12.77
KB
-rw-r--r--
2021-09-24 12:03
test_bisect.py
13.63
KB
-rw-r--r--
2021-09-24 12:03
test_bool.py
11.91
KB
-rw-r--r--
2021-09-24 12:03
test_buffer.py
158.83
KB
-rw-r--r--
2021-09-24 12:03
test_bufio.py
2.54
KB
-rw-r--r--
2021-09-24 12:03
test_builtin.py
65.17
KB
-rw-r--r--
2021-09-24 12:03
test_bytes.py
57.46
KB
-rw-r--r--
2021-09-24 12:03
test_bz2.py
36.49
KB
-rw-r--r--
2021-09-24 12:03
test_calendar.py
43.59
KB
-rw-r--r--
2021-09-24 12:03
test_call.py
3.01
KB
-rw-r--r--
2021-09-24 12:03
test_capi.py
23.21
KB
-rw-r--r--
2021-09-24 12:03
test_cgi.py
19.33
KB
-rw-r--r--
2021-09-24 12:03
test_cgitb.py
2.44
KB
-rw-r--r--
2021-09-24 12:03
test_charmapcodec.py
1.69
KB
-rw-r--r--
2021-09-24 12:03
test_class.py
15.08
KB
-rw-r--r--
2021-09-24 12:03
test_cmath.py
23.03
KB
-rw-r--r--
2021-09-24 12:03
test_cmd.py
6.11
KB
-rw-r--r--
2021-09-24 12:03
test_cmd_line.py
20.01
KB
-rw-r--r--
2021-09-24 12:03
test_cmd_line_script.py
28.18
KB
-rw-r--r--
2021-09-24 12:03
test_code.py
5.13
KB
-rw-r--r--
2021-09-24 12:03
test_code_module.py
4.14
KB
-rw-r--r--
2021-09-24 12:03
test_codeccallbacks.py
40.88
KB
-rw-r--r--
2021-09-24 12:03
test_codecencodings_cn.py
3.88
KB
-rw-r--r--
2021-09-24 12:03
test_codecencodings_hk.py
726
B
-rw-r--r--
2021-09-24 12:03
test_codecencodings_iso2022.py
1.38
KB
-rw-r--r--
2021-09-24 12:03
test_codecencodings_jp.py
4.82
KB
-rw-r--r--
2021-09-24 12:03
test_codecencodings_kr.py
2.98
KB
-rw-r--r--
2021-09-24 12:03
test_codecencodings_tw.py
706
B
-rw-r--r--
2021-09-24 12:03
test_codecmaps_cn.py
771
B
-rw-r--r--
2021-09-24 12:03
test_codecmaps_hk.py
411
B
-rw-r--r--
2021-09-24 12:03
test_codecmaps_jp.py
1.73
KB
-rw-r--r--
2021-09-24 12:03
test_codecmaps_kr.py
1.19
KB
-rw-r--r--
2021-09-24 12:03
test_codecmaps_tw.py
730
B
-rw-r--r--
2021-09-24 12:03
test_codecs.py
118.79
KB
-rw-r--r--
2021-09-24 12:03
test_codeop.py
7.39
KB
-rw-r--r--
2021-09-24 12:03
test_collections.py
62.14
KB
-rw-r--r--
2021-09-24 12:03
test_colorsys.py
3.83
KB
-rw-r--r--
2021-09-24 12:03
test_compare.py
3.82
KB
-rw-r--r--
2021-09-24 12:03
test_compile.py
26.33
KB
-rw-r--r--
2021-09-24 12:03
test_compileall.py
20.61
KB
-rw-r--r--
2021-09-24 12:03
test_complex.py
28.84
KB
-rw-r--r--
2021-09-24 12:03
test_concurrent_futures.py
25.28
KB
-rw-r--r--
2021-09-24 12:03
test_configparser.py
82.34
KB
-rw-r--r--
2021-09-24 12:03
test_contains.py
2.5
KB
-rw-r--r--
2021-09-24 12:03
test_contextlib.py
29.51
KB
-rw-r--r--
2021-09-24 12:03
test_copy.py
25.77
KB
-rw-r--r--
2021-09-24 12:03
test_copyreg.py
4.04
KB
-rw-r--r--
2021-09-24 12:03
test_coroutines.py
47.08
KB
-rw-r--r--
2021-09-24 12:03
test_cprofile.py
5.43
KB
-rw-r--r--
2021-09-24 12:03
test_crashers.py
1.16
KB
-rw-r--r--
2021-09-24 12:03
test_crypt.py
1.06
KB
-rw-r--r--
2021-09-24 12:03
test_csv.py
42.62
KB
-rw-r--r--
2021-09-24 12:03
test_ctypes.py
184
B
-rw-r--r--
2021-09-24 12:03
test_curses.py
17.6
KB
-rw-r--r--
2021-09-24 12:03
test_datetime.py
1.8
KB
-rw-r--r--
2021-09-24 12:03
test_dbm.py
6.05
KB
-rw-r--r--
2021-09-24 12:03
test_dbm_dumb.py
7.99
KB
-rw-r--r--
2021-09-24 12:03
test_dbm_gnu.py
3.28
KB
-rw-r--r--
2021-09-24 12:03
test_dbm_ndbm.py
2.17
KB
-rw-r--r--
2021-09-24 12:03
test_decimal.py
204.64
KB
-rw-r--r--
2021-09-24 12:03
test_decorators.py
9.48
KB
-rw-r--r--
2021-09-24 12:03
test_defaultdict.py
5.89
KB
-rw-r--r--
2021-09-24 12:03
test_deque.py
32.56
KB
-rw-r--r--
2021-09-24 12:03
test_descr.py
182.08
KB
-rw-r--r--
2021-09-24 12:03
test_descrtut.py
11.5
KB
-rw-r--r--
2021-09-24 12:03
test_devpoll.py
4.53
KB
-rw-r--r--
2021-09-24 12:03
test_dict.py
33.19
KB
-rw-r--r--
2021-09-24 12:03
test_dictcomps.py
3.69
KB
-rw-r--r--
2021-09-24 12:03
test_dictviews.py
10.13
KB
-rw-r--r--
2021-09-24 12:03
test_difflib.py
19.15
KB
-rw-r--r--
2021-09-24 12:03
test_difflib_expect.html
100.86
KB
-rw-r--r--
2019-11-02 02:32
test_dis.py
42.14
KB
-rw-r--r--
2021-09-24 12:03
test_distutils.py
375
B
-rw-r--r--
2021-09-24 12:03
test_doctest.py
93.24
KB
-rw-r--r--
2021-09-24 12:03
test_doctest.txt
300
B
-rw-r--r--
2019-11-02 02:32
test_doctest2.py
2.3
KB
-rw-r--r--
2021-09-24 12:03
test_doctest2.txt
392
B
-rw-r--r--
2019-11-02 02:32
test_doctest3.txt
82
B
-rw-r--r--
2019-11-02 02:32
test_doctest4.txt
244
B
-rw-r--r--
2019-11-02 02:32
test_docxmlrpc.py
8.73
KB
-rw-r--r--
2021-09-24 12:03
test_dummy_thread.py
9.16
KB
-rw-r--r--
2021-09-24 12:03
test_dummy_threading.py
1.7
KB
-rw-r--r--
2021-09-24 12:03
test_dynamic.py
4.31
KB
-rw-r--r--
2021-09-24 12:03
test_dynamicclassattribute.py
9.57
KB
-rw-r--r--
2021-09-24 12:03
test_eintr.py
687
B
-rw-r--r--
2021-09-24 12:03
test_ensurepip.py
11.4
KB
-rw-r--r--
2021-09-24 12:03
test_enum.py
60.52
KB
-rw-r--r--
2021-09-24 12:03
test_enumerate.py
7.68
KB
-rw-r--r--
2021-09-24 12:03
test_eof.py
803
B
-rw-r--r--
2021-09-24 12:03
test_epoll.py
8.62
KB
-rw-r--r--
2021-09-24 12:03
test_errno.py
1.04
KB
-rw-r--r--
2021-09-24 12:03
test_exception_variations.py
3.86
KB
-rw-r--r--
2021-09-24 12:03
test_exceptions.py
40.46
KB
-rw-r--r--
2021-09-24 12:03
test_extcall.py
11.52
KB
-rw-r--r--
2021-09-24 12:03
test_faulthandler.py
23.45
KB
-rw-r--r--
2021-09-24 12:03
test_fcntl.py
5.1
KB
-rw-r--r--
2021-09-24 12:03
test_file.py
11.09
KB
-rw-r--r--
2021-09-24 12:03
test_file_eintr.py
10.6
KB
-rw-r--r--
2021-09-24 12:03
test_filecmp.py
8.69
KB
-rw-r--r--
2021-09-24 12:03
test_fileinput.py
36.77
KB
-rw-r--r--
2021-09-24 12:03
test_fileio.py
18.57
KB
-rw-r--r--
2021-09-24 12:03
test_finalization.py
14.16
KB
-rw-r--r--
2021-09-24 12:03
test_float.py
60.05
KB
-rw-r--r--
2021-09-24 12:03
test_flufl.py
750
B
-rw-r--r--
2021-09-24 12:03
test_fnmatch.py
4.69
KB
-rw-r--r--
2021-09-24 12:03
test_fork1.py
3.74
KB
-rw-r--r--
2021-09-24 12:03
test_format.py
22.57
KB
-rw-r--r--
2021-09-24 12:03
test_fractions.py
25.84
KB
-rw-r--r--
2021-09-24 12:03
test_frame.py
4.37
KB
-rw-r--r--
2021-09-24 12:03
test_ftplib.py
37.08
KB
-rw-r--r--
2021-09-24 12:03
test_funcattrs.py
12.7
KB
-rw-r--r--
2021-09-24 12:03
test_functools.py
74.47
KB
-rw-r--r--
2021-09-24 12:03
test_future.py
3.74
KB
-rw-r--r--
2021-09-24 12:03
test_future3.py
490
B
-rw-r--r--
2021-09-24 12:03
test_future4.py
105
B
-rw-r--r--
2021-09-24 12:03
test_future5.py
510
B
-rw-r--r--
2021-09-24 12:03
test_gc.py
33.37
KB
-rw-r--r--
2021-09-24 12:03
test_gdb.py
36.38
KB
-rw-r--r--
2021-09-24 12:03
test_generators.py
58.2
KB
-rw-r--r--
2021-09-24 12:03
test_genericpath.py
18.36
KB
-rw-r--r--
2021-09-24 12:03
test_genexps.py
7.12
KB
-rw-r--r--
2021-09-24 12:03
test_getargs2.py
36.1
KB
-rw-r--r--
2021-09-24 12:03
test_getopt.py
6.75
KB
-rw-r--r--
2021-09-24 12:03
test_getpass.py
6.29
KB
-rw-r--r--
2021-09-24 12:03
test_gettext.py
32.8
KB
-rw-r--r--
2021-09-24 12:03
test_glob.py
12.39
KB
-rw-r--r--
2021-09-24 12:03
test_global.py
1.25
KB
-rw-r--r--
2021-09-24 12:03
test_grammar.py
36.48
KB
-rw-r--r--
2021-09-24 12:03
test_grp.py
3.22
KB
-rw-r--r--
2021-09-24 12:03
test_gzip.py
22.27
KB
-rw-r--r--
2021-09-24 12:03
test_hash.py
11.44
KB
-rw-r--r--
2021-09-24 12:03
test_hashlib.py
21.44
KB
-rw-r--r--
2021-09-24 12:03
test_heapq.py
14.64
KB
-rw-r--r--
2021-09-24 12:03
test_hmac.py
20.03
KB
-rw-r--r--
2021-09-24 12:03
test_html.py
4.23
KB
-rw-r--r--
2021-09-24 12:03
test_htmlparser.py
31.96
KB
-rw-r--r--
2021-09-24 12:03
test_http_cookiejar.py
74.54
KB
-rw-r--r--
2021-09-24 12:03
test_http_cookies.py
18.17
KB
-rw-r--r--
2021-09-24 12:03
test_httplib.py
65.96
KB
-rw-r--r--
2021-09-24 12:03
test_httpservers.py
38.29
KB
-rw-r--r--
2021-09-24 12:03
test_idle.py
756
B
-rw-r--r--
2021-09-24 12:03
test_imaplib.py
35.46
KB
-rw-r--r--
2021-09-24 12:03
test_imghdr.py
4.37
KB
-rw-r--r--
2021-09-24 12:03
test_imp.py
15.41
KB
-rw-r--r--
2021-09-24 12:03
test_index.py
8.37
KB
-rw-r--r--
2021-09-24 12:03
test_inspect.py
136.84
KB
-rw-r--r--
2021-09-24 12:03
test_int.py
17.71
KB
-rw-r--r--
2021-09-24 12:03
test_int_literal.py
6.89
KB
-rw-r--r--
2021-09-24 12:03
test_io.py
144.79
KB
-rw-r--r--
2021-09-24 12:03
test_ioctl.py
3.19
KB
-rw-r--r--
2021-09-24 12:03
test_ipaddress.py
85.14
KB
-rw-r--r--
2021-09-24 12:03
test_isinstance.py
9.77
KB
-rw-r--r--
2021-09-24 12:03
test_iter.py
31.25
KB
-rw-r--r--
2021-09-24 12:03
test_iterlen.py
7.12
KB
-rw-r--r--
2021-09-24 12:03
test_itertools.py
91.42
KB
-rw-r--r--
2021-09-24 12:03
test_keyword.py
5.7
KB
-rw-r--r--
2021-09-24 12:03
test_keywordonlyarg.py
7.05
KB
-rw-r--r--
2021-09-24 12:03
test_kqueue.py
8.14
KB
-rw-r--r--
2021-09-24 12:03
test_largefile.py
6.4
KB
-rw-r--r--
2021-09-24 12:03
test_lib2to3.py
101
B
-rw-r--r--
2021-09-24 12:03
test_linecache.py
6.43
KB
-rw-r--r--
2021-09-24 12:03
test_list.py
5.33
KB
-rw-r--r--
2021-09-24 12:03
test_listcomps.py
3.76
KB
-rw-r--r--
2021-09-24 12:03
test_locale.py
21.84
KB
-rw-r--r--
2021-09-24 12:03
test_logging.py
147.04
KB
-rw-r--r--
2021-09-24 12:03
test_long.py
48.38
KB
-rw-r--r--
2021-09-24 12:03
test_longexp.py
233
B
-rw-r--r--
2021-09-24 12:03
test_lzma.py
76.59
KB
-rw-r--r--
2021-09-24 12:03
test_macpath.py
6.04
KB
-rw-r--r--
2021-09-24 12:03
test_macurl2path.py
1.8
KB
-rw-r--r--
2021-09-24 12:03
test_mailbox.py
90.51
KB
-rw-r--r--
2021-09-24 12:03
test_mailcap.py
9.89
KB
-rw-r--r--
2021-09-24 12:03
test_marshal.py
17.7
KB
-rw-r--r--
2021-09-24 12:03
test_math.py
53.51
KB
-rw-r--r--
2021-09-24 12:03
test_memoryio.py
30.24
KB
-rw-r--r--
2021-09-24 12:03
test_memoryview.py
17.44
KB
-rw-r--r--
2021-09-24 12:03
test_metaclass.py
6.2
KB
-rw-r--r--
2021-09-24 12:03
test_mimetypes.py
4.08
KB
-rw-r--r--
2021-09-24 12:03
test_minidom.py
63.91
KB
-rw-r--r--
2021-09-24 12:03
test_mmap.py
27.3
KB
-rw-r--r--
2021-09-24 12:03
test_module.py
8.44
KB
-rw-r--r--
2021-09-24 12:03
test_modulefinder.py
9.05
KB
-rw-r--r--
2021-09-24 12:03
test_msilib.py
1.38
KB
-rw-r--r--
2021-09-24 12:03
test_multibytecodec.py
10.07
KB
-rw-r--r--
2021-09-24 12:03
test_multiprocessing_fork.py
174
B
-rw-r--r--
2021-09-24 12:03
test_multiprocessing_forkserver.py
180
B
-rw-r--r--
2021-09-24 12:03
test_multiprocessing_main_handling.py
11.26
KB
-rw-r--r--
2021-09-24 12:03
test_multiprocessing_spawn.py
175
B
-rw-r--r--
2021-09-24 12:03
test_netrc.py
4.5
KB
-rw-r--r--
2021-09-24 12:03
test_nis.py
1.14
KB
-rw-r--r--
2021-09-24 12:03
test_nntplib.py
60.53
KB
-rw-r--r--
2021-09-24 12:03
test_normalization.py
3.34
KB
-rw-r--r--
2021-09-24 12:03
test_ntpath.py
21.4
KB
-rw-r--r--
2021-09-24 12:03
test_numeric_tower.py
7.18
KB
-rw-r--r--
2021-09-24 12:03
test_opcodes.py
2.53
KB
-rw-r--r--
2021-09-24 12:03
test_openpty.py
600
B
-rw-r--r--
2021-09-24 12:03
test_operator.py
22.78
KB
-rw-r--r--
2021-09-24 12:03
test_optparse.py
60.8
KB
-rw-r--r--
2021-09-24 12:03
test_ordered_dict.py
26
KB
-rw-r--r--
2021-09-24 12:03
test_os.py
120.02
KB
-rw-r--r--
2021-09-24 12:03
test_ossaudiodev.py
7.05
KB
-rw-r--r--
2021-09-24 12:03
test_osx_env.py
1.3
KB
-rw-r--r--
2021-09-24 12:03
test_parser.py
29.6
KB
-rw-r--r--
2021-09-24 12:03
test_pathlib.py
85.31
KB
-rw-r--r--
2021-09-24 12:03
test_pdb.py
34.08
KB
-rw-r--r--
2021-09-24 12:03
test_peepholer.py
12.33
KB
-rw-r--r--
2021-09-24 12:03
test_pep247.py
2.12
KB
-rw-r--r--
2021-09-24 12:03
test_pep277.py
6.84
KB
-rw-r--r--
2021-09-24 12:03
test_pep3120.py
1.15
KB
-rw-r--r--
2021-09-24 12:03
test_pep3131.py
902
B
-rw-r--r--
2021-09-24 12:03
test_pep3151.py
7.24
KB
-rw-r--r--
2021-09-24 12:03
test_pep352.py
6.88
KB
-rw-r--r--
2021-09-24 12:03
test_pep380.py
28.8
KB
-rw-r--r--
2021-09-24 12:03
test_pep479.py
943
B
-rw-r--r--
2021-09-24 12:03
test_pickle.py
16.07
KB
-rw-r--r--
2021-09-24 12:03
test_pickletools.py
2.37
KB
-rw-r--r--
2021-09-24 12:03
test_pipes.py
6.32
KB
-rw-r--r--
2021-09-24 12:03
test_pkg.py
9.48
KB
-rw-r--r--
2021-09-24 12:03
test_pkgimport.py
2.67
KB
-rw-r--r--
2021-09-24 12:03
test_pkgutil.py
17.13
KB
-rw-r--r--
2021-09-24 12:03
test_platform.py
14.44
KB
-rw-r--r--
2021-09-24 12:03
test_plistlib.py
23.38
KB
-rw-r--r--
2021-09-24 12:03
test_poll.py
6.46
KB
-rw-r--r--
2021-09-24 12:03
test_popen.py
1.98
KB
-rw-r--r--
2021-09-24 12:03
test_poplib.py
16.25
KB
-rw-r--r--
2021-09-24 12:03
test_posix.py
51.69
KB
-rw-r--r--
2021-09-24 12:03
test_posixpath.py
26.01
KB
-rw-r--r--
2021-09-24 12:03
test_pow.py
4.38
KB
-rw-r--r--
2021-09-24 12:03
test_pprint.py
43.49
KB
-rw-r--r--
2021-09-24 12:03
test_print.py
4.16
KB
-rw-r--r--
2021-09-24 12:03
test_profile.py
7.61
KB
-rw-r--r--
2021-09-24 12:03
test_property.py
8.34
KB
-rw-r--r--
2021-09-24 12:03
test_pstats.py
1.17
KB
-rw-r--r--
2021-09-24 12:03
test_pty.py
10.9
KB
-rw-r--r--
2021-09-24 12:03
test_pulldom.py
12.08
KB
-rw-r--r--
2021-09-24 12:03
test_pwd.py
4.08
KB
-rw-r--r--
2021-09-24 12:03
test_py_compile.py
5.21
KB
-rw-r--r--
2021-09-24 12:03
test_pyclbr.py
6.79
KB
-rw-r--r--
2021-09-24 12:03
test_pydoc.py
39.47
KB
-rw-r--r--
2021-09-24 12:03
test_pyexpat.py
26.52
KB
-rw-r--r--
2021-09-24 12:03
test_queue.py
12.71
KB
-rw-r--r--
2021-09-24 12:03
test_quopri.py
7.78
KB
-rw-r--r--
2021-09-24 12:03
test_raise.py
11.03
KB
-rw-r--r--
2021-09-24 12:03
test_random.py
32.47
KB
-rw-r--r--
2021-09-24 12:03
test_range.py
24.19
KB
-rw-r--r--
2021-09-24 12:03
test_re.py
88.39
KB
-rw-r--r--
2021-09-24 12:03
test_readline.py
11.42
KB
-rw-r--r--
2021-09-24 12:03
test_regrtest.py
34.03
KB
-rw-r--r--
2021-09-24 12:03
test_reprlib.py
15.12
KB
-rw-r--r--
2021-09-24 12:03
test_resource.py
6.98
KB
-rw-r--r--
2021-09-24 12:03
test_richcmp.py
10.77
KB
-rw-r--r--
2021-09-24 12:03
test_rlcompleter.py
4.68
KB
-rw-r--r--
2021-09-24 12:03
test_robotparser.py
7.35
KB
-rw-r--r--
2021-09-24 12:03
test_runpy.py
30.95
KB
-rw-r--r--
2021-09-24 12:03
test_sax.py
43.59
KB
-rw-r--r--
2021-09-24 12:03
test_sched.py
6.43
KB
-rw-r--r--
2021-09-24 12:03
test_scope.py
19.7
KB
-rw-r--r--
2021-09-24 12:03
test_script_helper.py
5.02
KB
-rw-r--r--
2021-09-24 12:03
test_select.py
2.65
KB
-rw-r--r--
2021-09-24 12:03
test_selectors.py
16.27
KB
-rw-r--r--
2021-09-24 12:03
test_set.py
63.58
KB
-rw-r--r--
2021-09-24 12:03
test_setcomps.py
3.7
KB
-rw-r--r--
2021-09-24 12:03
test_shelve.py
6.24
KB
-rw-r--r--
2021-09-24 12:03
test_shlex.py
6.09
KB
-rw-r--r--
2021-09-24 12:03
test_shutil.py
74.79
KB
-rw-r--r--
2021-09-24 12:03
test_signal.py
38.1
KB
-rw-r--r--
2021-09-24 12:03
test_site.py
19.2
KB
-rw-r--r--
2021-09-24 12:03
test_slice.py
8.25
KB
-rw-r--r--
2021-09-24 12:03
test_smtpd.py
40.7
KB
-rw-r--r--
2021-09-24 12:03
test_smtplib.py
48.76
KB
-rw-r--r--
2021-09-24 12:03
test_smtpnet.py
2.7
KB
-rw-r--r--
2021-09-24 12:03
test_sndhdr.py
1.43
KB
-rw-r--r--
2021-09-24 12:03
test_socket.py
198.65
KB
-rw-r--r--
2021-09-24 12:03
test_socketserver.py
10.42
KB
-rw-r--r--
2021-09-24 12:03
test_sort.py
8.47
KB
-rw-r--r--
2021-09-24 12:03
test_source_encoding.py
7.88
KB
-rw-r--r--
2021-09-24 12:03
test_spwd.py
2.29
KB
-rw-r--r--
2021-09-24 12:03
test_sqlite.py
893
B
-rw-r--r--
2021-09-24 12:03
test_ssl.py
151.89
KB
-rw-r--r--
2021-09-24 12:03
test_startfile.py
1.17
KB
-rw-r--r--
2021-09-24 12:03
test_stat.py
7.99
KB
-rw-r--r--
2021-09-24 12:03
test_statistics.py
68.88
KB
-rw-r--r--
2021-09-24 12:03
test_strftime.py
7.42
KB
-rw-r--r--
2021-09-24 12:03
test_string.py
17.73
KB
-rw-r--r--
2021-09-24 12:03
test_stringprep.py
3.04
KB
-rw-r--r--
2021-09-24 12:03
test_strlit.py
7.96
KB
-rw-r--r--
2021-09-24 12:03
test_strptime.py
28.83
KB
-rw-r--r--
2021-09-24 12:03
test_strtod.py
20.06
KB
-rw-r--r--
2021-09-24 12:03
test_struct.py
26.99
KB
-rw-r--r--
2021-09-24 12:03
test_structmembers.py
4.7
KB
-rw-r--r--
2021-09-24 12:03
test_structseq.py
3.87
KB
-rw-r--r--
2021-09-24 12:03
test_subprocess.py
118.75
KB
-rw-r--r--
2021-09-24 12:03
test_sunau.py
4.55
KB
-rw-r--r--
2021-09-24 12:03
test_sundry.py
2.08
KB
-rw-r--r--
2021-09-24 12:03
test_super.py
4.73
KB
-rw-r--r--
2021-09-24 12:03
test_support.py
12.39
KB
-rw-r--r--
2021-09-24 12:03
test_symtable.py
6.17
KB
-rw-r--r--
2021-09-24 12:03
test_syntax.py
18.75
KB
-rw-r--r--
2021-09-24 12:03
test_sys.py
44.78
KB
-rw-r--r--
2021-09-24 12:03
test_sys_setprofile.py
10.9
KB
-rw-r--r--
2021-09-24 12:03
test_sys_settrace.py
24.93
KB
-rw-r--r--
2021-09-24 12:03
test_sysconfig.py
17.68
KB
-rw-r--r--
2021-09-24 12:03
test_syslog.py
1.15
KB
-rw-r--r--
2021-09-24 12:03
test_tarfile.py
91.51
KB
-rw-r--r--
2021-09-24 12:03
test_tcl.py
27.43
KB
-rw-r--r--
2021-09-24 12:03
test_telnetlib.py
12.56
KB
-rw-r--r--
2021-09-24 12:03
test_tempfile.py
50.21
KB
-rw-r--r--
2021-09-24 12:03
test_textwrap.py
37.69
KB
-rw-r--r--
2021-09-24 12:03
test_thread.py
8.06
KB
-rw-r--r--
2021-09-24 12:03
test_threaded_import.py
8.52
KB
-rw-r--r--
2021-09-24 12:03
test_threadedtempfile.py
1.89
KB
-rw-r--r--
2021-09-24 12:03
test_threading.py
38.92
KB
-rw-r--r--
2021-09-24 12:03
test_threading_local.py
6.13
KB
-rw-r--r--
2021-09-24 12:03
test_threadsignals.py
9.22
KB
-rw-r--r--
2021-09-24 12:03
test_time.py
38.01
KB
-rw-r--r--
2021-09-24 12:03
test_timeit.py
13.61
KB
-rw-r--r--
2021-09-24 12:03
test_timeout.py
11.11
KB
-rw-r--r--
2021-09-24 12:03
test_tix.py
756
B
-rw-r--r--
2021-09-24 12:03
test_tk.py
362
B
-rw-r--r--
2021-09-24 12:03
test_tokenize.py
58.62
KB
-rw-r--r--
2021-09-24 12:03
test_trace.py
14.58
KB
-rw-r--r--
2021-09-24 12:03
test_traceback.py
34.72
KB
-rw-r--r--
2021-09-24 12:03
test_tracemalloc.py
30.1
KB
-rw-r--r--
2021-09-24 12:03
test_ttk_guionly.py
756
B
-rw-r--r--
2021-09-24 12:03
test_ttk_textonly.py
309
B
-rw-r--r--
2021-09-24 12:03
test_tuple.py
7.35
KB
-rw-r--r--
2021-09-24 12:03
test_turtle.py
12.36
KB
-rw-r--r--
2021-09-24 12:03
test_typechecks.py
2.55
KB
-rw-r--r--
2021-09-24 12:03
test_types.py
52.54
KB
-rw-r--r--
2021-09-24 12:03
test_typing.py
79.92
KB
-rw-r--r--
2021-09-24 12:03
test_ucn.py
9.35
KB
-rw-r--r--
2021-09-24 12:03
test_unary.py
1.63
KB
-rw-r--r--
2021-09-24 12:03
test_unicode.py
127.39
KB
-rw-r--r--
2021-09-24 12:03
test_unicode_file.py
5.73
KB
-rw-r--r--
2021-09-24 12:03
test_unicodedata.py
11.89
KB
-rw-r--r--
2021-09-24 12:03
test_unittest.py
286
B
-rw-r--r--
2021-09-24 12:03
test_univnewlines.py
3.83
KB
-rw-r--r--
2021-09-24 12:03
test_unpack.py
2.57
KB
-rw-r--r--
2021-09-24 12:03
test_unpack_ex.py
8.74
KB
-rw-r--r--
2021-09-24 12:03
test_urllib.py
66.43
KB
-rw-r--r--
2021-09-24 12:03
test_urllib2.py
71.83
KB
-rw-r--r--
2021-09-24 12:03
test_urllib2_localnet.py
24.11
KB
-rw-r--r--
2021-09-24 12:03
test_urllib2net.py
12.36
KB
-rw-r--r--
2021-09-24 12:03
test_urllib_response.py
1.69
KB
-rw-r--r--
2021-09-24 12:03
test_urllibnet.py
8.84
KB
-rw-r--r--
2021-09-24 12:03
test_urlparse.py
55.89
KB
-rw-r--r--
2021-09-24 12:03
test_userdict.py
7.66
KB
-rw-r--r--
2021-09-24 12:03
test_userlist.py
1.82
KB
-rw-r--r--
2021-09-24 12:03
test_userstring.py
1.46
KB
-rw-r--r--
2021-09-24 12:03
test_uu.py
7.39
KB
-rw-r--r--
2021-09-24 12:03
test_uuid.py
22.12
KB
-rw-r--r--
2021-09-24 12:03
test_venv.py
17.43
KB
-rw-r--r--
2021-09-24 12:03
test_wait3.py
1.16
KB
-rw-r--r--
2021-09-24 12:03
test_wait4.py
1.15
KB
-rw-r--r--
2021-09-24 12:03
test_wave.py
3.93
KB
-rw-r--r--
2021-09-24 12:03
test_weakref.py
64.45
KB
-rw-r--r--
2021-09-24 12:03
test_weakset.py
15.08
KB
-rw-r--r--
2021-09-24 12:03
test_webbrowser.py
6.32
KB
-rw-r--r--
2021-09-24 12:03
test_winreg.py
20.52
KB
-rw-r--r--
2021-09-24 12:03
test_winsound.py
3.72
KB
-rw-r--r--
2021-09-24 12:03
test_with.py
25.68
KB
-rw-r--r--
2021-09-24 12:03
test_wsgiref.py
27.08
KB
-rw-r--r--
2021-09-24 12:03
test_xdrlib.py
2.17
KB
-rw-r--r--
2021-09-24 12:03
test_xml_dom_minicompat.py
4.18
KB
-rw-r--r--
2021-09-24 12:03
test_xml_etree.py
112.18
KB
-rw-r--r--
2021-09-24 12:03
test_xml_etree_c.py
4.3
KB
-rw-r--r--
2021-09-24 12:03
test_xmlrpc.py
51.75
KB
-rw-r--r--
2021-09-24 12:03
test_xmlrpc_net.py
1.03
KB
-rw-r--r--
2021-09-24 12:03
test_zipapp.py
13.74
KB
-rw-r--r--
2021-09-24 12:03
test_zipfile.py
85.1
KB
-rw-r--r--
2021-09-24 12:03
test_zipfile64.py
5.72
KB
-rw-r--r--
2021-09-24 12:03
test_zipimport.py
26.9
KB
-rw-r--r--
2021-09-24 12:03
test_zipimport_support.py
10.47
KB
-rw-r--r--
2021-09-24 12:03
test_zlib.py
32.46
KB
-rw-r--r--
2021-09-24 12:03
testcodec.py
1.02
KB
-rw-r--r--
2021-09-24 12:03
testtar.tar
425
KB
-rw-r--r--
2019-11-02 02:32
tf_inherit_check.py
714
B
-rw-r--r--
2021-09-24 12:03
threaded_import_hangers.py
1.45
KB
-rw-r--r--
2021-09-24 12:03
time_hashlib.py
2.83
KB
-rw-r--r--
2021-09-24 12:03
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
444
B
-rw-r--r--
2019-11-02 02:32
tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
303
B
-rw-r--r--
2019-11-02 02:32
tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
421
B
-rw-r--r--
2019-11-02 02:32
tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
327
B
-rw-r--r--
2019-11-02 02:32
tokenize_tests.txt
2.65
KB
-rw-r--r--
2019-11-02 02:32
win_console_handler.py
1.38
KB
-rw-r--r--
2021-09-24 12:03
wrongcert.pem
1.84
KB
-rw-r--r--
2019-11-02 02:32
xmltests.py
499
B
-rw-r--r--
2021-09-24 12:03
zip_cp437_header.zip
270
B
-rw-r--r--
2019-11-02 02:32
zipdir.zip
374
B
-rw-r--r--
2019-11-02 02:32
Save
Rename
import copy import parser import pickle import unittest import sys import operator import struct from test import support from test.support.script_helper import assert_python_failure # # First, we test that we can generate trees from valid source fragments, # and that these valid trees are indeed allowed by the tree-loading side # of the parser module. # class RoundtripLegalSyntaxTestCase(unittest.TestCase): def roundtrip(self, f, s): st1 = f(s) t = st1.totuple() try: st2 = parser.sequence2st(t) except parser.ParserError as why: self.fail("could not roundtrip %r: %s" % (s, why)) self.assertEqual(t, st2.totuple(), "could not re-generate syntax tree") def check_expr(self, s): self.roundtrip(parser.expr, s) def test_flags_passed(self): # The unicode literals flags has to be passed from the paser to AST # generation. suite = parser.suite("from __future__ import unicode_literals; x = ''") code = suite.compile() scope = {} exec(code, {}, scope) self.assertIsInstance(scope["x"], str) def check_suite(self, s): self.roundtrip(parser.suite, s) def test_yield_statement(self): self.check_suite("def f(): yield 1") self.check_suite("def f(): yield") self.check_suite("def f(): x += yield") self.check_suite("def f(): x = yield 1") self.check_suite("def f(): x = y = yield 1") self.check_suite("def f(): x = yield") self.check_suite("def f(): x = y = yield") self.check_suite("def f(): 1 + (yield)*2") self.check_suite("def f(): (yield 1)*2") self.check_suite("def f(): return; yield 1") self.check_suite("def f(): yield 1; return") self.check_suite("def f(): yield from 1") self.check_suite("def f(): x = yield from 1") self.check_suite("def f(): f((yield from 1))") self.check_suite("def f(): yield 1; return 1") self.check_suite("def f():\n" " for x in range(30):\n" " yield x\n") self.check_suite("def f():\n" " if (yield):\n" " yield x\n") def test_await_statement(self): self.check_suite("async def f():\n await smth()") self.check_suite("async def f():\n foo = await smth()") self.check_suite("async def f():\n foo, bar = await smth()") self.check_suite("async def f():\n (await smth())") self.check_suite("async def f():\n foo((await smth()))") self.check_suite("async def f():\n await foo(); return 42") def test_async_with_statement(self): self.check_suite("async def f():\n async with 1: pass") self.check_suite("async def f():\n async with a as b, c as d: pass") def test_async_for_statement(self): self.check_suite("async def f():\n async for i in (): pass") self.check_suite("async def f():\n async for i, b in (): pass") def test_nonlocal_statement(self): self.check_suite("def f():\n" " x = 0\n" " def g():\n" " nonlocal x\n") self.check_suite("def f():\n" " x = y = 0\n" " def g():\n" " nonlocal x, y\n") def test_expressions(self): self.check_expr("foo(1)") self.check_expr("[1, 2, 3]") self.check_expr("[x**3 for x in range(20)]") self.check_expr("[x**3 for x in range(20) if x % 3]") self.check_expr("[x**3 for x in range(20) if x % 2 if x % 3]") self.check_expr("list(x**3 for x in range(20))") self.check_expr("list(x**3 for x in range(20) if x % 3)") self.check_expr("list(x**3 for x in range(20) if x % 2 if x % 3)") self.check_expr("foo(*args)") self.check_expr("foo(*args, **kw)") self.check_expr("foo(**kw)") self.check_expr("foo(key=value)") self.check_expr("foo(key=value, *args)") self.check_expr("foo(key=value, *args, **kw)") self.check_expr("foo(key=value, **kw)") self.check_expr("foo(a, b, c, *args)") self.check_expr("foo(a, b, c, *args, **kw)") self.check_expr("foo(a, b, c, **kw)") self.check_expr("foo(a, *args, keyword=23)") self.check_expr("foo + bar") self.check_expr("foo - bar") self.check_expr("foo * bar") self.check_expr("foo / bar") self.check_expr("foo // bar") self.check_expr("lambda: 0") self.check_expr("lambda x: 0") self.check_expr("lambda *y: 0") self.check_expr("lambda *y, **z: 0") self.check_expr("lambda **z: 0") self.check_expr("lambda x, y: 0") self.check_expr("lambda foo=bar: 0") self.check_expr("lambda foo=bar, spaz=nifty+spit: 0") self.check_expr("lambda foo=bar, **z: 0") self.check_expr("lambda foo=bar, blaz=blat+2, **z: 0") self.check_expr("lambda foo=bar, blaz=blat+2, *y, **z: 0") self.check_expr("lambda x, *y, **z: 0") self.check_expr("(x for x in range(10))") self.check_expr("foo(x for x in range(10))") self.check_expr("...") self.check_expr("a[...]") def test_simple_expression(self): # expr_stmt self.check_suite("a") def test_simple_assignments(self): self.check_suite("a = b") self.check_suite("a = b = c = d = e") def test_simple_augmented_assignments(self): self.check_suite("a += b") self.check_suite("a -= b") self.check_suite("a *= b") self.check_suite("a /= b") self.check_suite("a //= b") self.check_suite("a %= b") self.check_suite("a &= b") self.check_suite("a |= b") self.check_suite("a ^= b") self.check_suite("a <<= b") self.check_suite("a >>= b") self.check_suite("a **= b") def test_function_defs(self): self.check_suite("def f(): pass") self.check_suite("def f(*args): pass") self.check_suite("def f(*args, **kw): pass") self.check_suite("def f(**kw): pass") self.check_suite("def f(foo=bar): pass") self.check_suite("def f(foo=bar, *args): pass") self.check_suite("def f(foo=bar, *args, **kw): pass") self.check_suite("def f(foo=bar, **kw): pass") self.check_suite("def f(a, b): pass") self.check_suite("def f(a, b, *args): pass") self.check_suite("def f(a, b, *args, **kw): pass") self.check_suite("def f(a, b, **kw): pass") self.check_suite("def f(a, b, foo=bar): pass") self.check_suite("def f(a, b, foo=bar, *args): pass") self.check_suite("def f(a, b, foo=bar, *args, **kw): pass") self.check_suite("def f(a, b, foo=bar, **kw): pass") self.check_suite("@staticmethod\n" "def f(): pass") self.check_suite("@staticmethod\n" "@funcattrs(x, y)\n" "def f(): pass") self.check_suite("@funcattrs()\n" "def f(): pass") # keyword-only arguments self.check_suite("def f(*, a): pass") self.check_suite("def f(*, a = 5): pass") self.check_suite("def f(*, a = 5, b): pass") self.check_suite("def f(*, a, b = 5): pass") self.check_suite("def f(*, a, b = 5, **kwds): pass") self.check_suite("def f(*args, a): pass") self.check_suite("def f(*args, a = 5): pass") self.check_suite("def f(*args, a = 5, b): pass") self.check_suite("def f(*args, a, b = 5): pass") self.check_suite("def f(*args, a, b = 5, **kwds): pass") # function annotations self.check_suite("def f(a: int): pass") self.check_suite("def f(a: int = 5): pass") self.check_suite("def f(*args: list): pass") self.check_suite("def f(**kwds: dict): pass") self.check_suite("def f(*, a: int): pass") self.check_suite("def f(*, a: int = 5): pass") self.check_suite("def f() -> int: pass") def test_class_defs(self): self.check_suite("class foo():pass") self.check_suite("class foo(object):pass") self.check_suite("@class_decorator\n" "class foo():pass") self.check_suite("@class_decorator(arg)\n" "class foo():pass") self.check_suite("@decorator1\n" "@decorator2\n" "class foo():pass") def test_import_from_statement(self): self.check_suite("from sys.path import *") self.check_suite("from sys.path import dirname") self.check_suite("from sys.path import (dirname)") self.check_suite("from sys.path import (dirname,)") self.check_suite("from sys.path import dirname as my_dirname") self.check_suite("from sys.path import (dirname as my_dirname)") self.check_suite("from sys.path import (dirname as my_dirname,)") self.check_suite("from sys.path import dirname, basename") self.check_suite("from sys.path import (dirname, basename)") self.check_suite("from sys.path import (dirname, basename,)") self.check_suite( "from sys.path import dirname as my_dirname, basename") self.check_suite( "from sys.path import (dirname as my_dirname, basename)") self.check_suite( "from sys.path import (dirname as my_dirname, basename,)") self.check_suite( "from sys.path import dirname, basename as my_basename") self.check_suite( "from sys.path import (dirname, basename as my_basename)") self.check_suite( "from sys.path import (dirname, basename as my_basename,)") self.check_suite("from .bogus import x") def test_basic_import_statement(self): self.check_suite("import sys") self.check_suite("import sys as system") self.check_suite("import sys, math") self.check_suite("import sys as system, math") self.check_suite("import sys, math as my_math") def test_relative_imports(self): self.check_suite("from . import name") self.check_suite("from .. import name") # check all the way up to '....', since '...' is tokenized # differently from '.' (it's an ellipsis token). self.check_suite("from ... import name") self.check_suite("from .... import name") self.check_suite("from .pkg import name") self.check_suite("from ..pkg import name") self.check_suite("from ...pkg import name") self.check_suite("from ....pkg import name") def test_pep263(self): self.check_suite("# -*- coding: iso-8859-1 -*-\n" "pass\n") def test_assert(self): self.check_suite("assert alo < ahi and blo < bhi\n") def test_with(self): self.check_suite("with open('x'): pass\n") self.check_suite("with open('x') as f: pass\n") self.check_suite("with open('x') as f, open('y') as g: pass\n") def test_try_stmt(self): self.check_suite("try: pass\nexcept: pass\n") self.check_suite("try: pass\nfinally: pass\n") self.check_suite("try: pass\nexcept A: pass\nfinally: pass\n") self.check_suite("try: pass\nexcept A: pass\nexcept: pass\n" "finally: pass\n") self.check_suite("try: pass\nexcept: pass\nelse: pass\n") self.check_suite("try: pass\nexcept: pass\nelse: pass\n" "finally: pass\n") def test_position(self): # An absolutely minimal test of position information. Better # tests would be a big project. code = "def f(x):\n return x + 1" st1 = parser.suite(code) st2 = st1.totuple(line_info=1, col_info=1) def walk(tree): node_type = tree[0] next = tree[1] if isinstance(next, tuple): for elt in tree[1:]: for x in walk(elt): yield x else: yield tree terminals = list(walk(st2)) self.assertEqual([ (1, 'def', 1, 0), (1, 'f', 1, 4), (7, '(', 1, 5), (1, 'x', 1, 6), (8, ')', 1, 7), (11, ':', 1, 8), (4, '', 1, 9), (5, '', 2, -1), (1, 'return', 2, 4), (1, 'x', 2, 11), (14, '+', 2, 13), (2, '1', 2, 15), (4, '', 2, 16), (6, '', 2, -1), (4, '', 2, -1), (0, '', 2, -1)], terminals) def test_extended_unpacking(self): self.check_suite("*a = y") self.check_suite("x, *b, = m") self.check_suite("[*a, *b] = y") self.check_suite("for [*x, b] in x: pass") def test_raise_statement(self): self.check_suite("raise\n") self.check_suite("raise e\n") self.check_suite("try:\n" " suite\n" "except Exception as e:\n" " raise ValueError from e\n") def test_list_displays(self): self.check_expr('[]') self.check_expr('[*{2}, 3, *[4]]') def test_set_displays(self): self.check_expr('{*{2}, 3, *[4]}') self.check_expr('{2}') self.check_expr('{2,}') self.check_expr('{2, 3}') self.check_expr('{2, 3,}') def test_dict_displays(self): self.check_expr('{}') self.check_expr('{a:b}') self.check_expr('{a:b,}') self.check_expr('{a:b, c:d}') self.check_expr('{a:b, c:d,}') self.check_expr('{**{}}') self.check_expr('{**{}, 3:4, **{5:6, 7:8}}') def test_argument_unpacking(self): self.check_expr("f(*a, **b)") self.check_expr('f(a, *b, *c, *d)') self.check_expr('f(**a, **b)') self.check_expr('f(2, *a, *b, **b, **c, **d)') self.check_expr("f(*b, *() or () and (), **{} and {}, **() or {})") def test_set_comprehensions(self): self.check_expr('{x for x in seq}') self.check_expr('{f(x) for x in seq}') self.check_expr('{f(x) for x in seq if condition(x)}') def test_dict_comprehensions(self): self.check_expr('{x:x for x in seq}') self.check_expr('{x**2:x[3] for x in seq if condition(x)}') self.check_expr('{x:x for x in seq1 for y in seq2 if condition(x, y)}') # # Second, we take *invalid* trees and make sure we get ParserError # rejections for them. # class IllegalSyntaxTestCase(unittest.TestCase): def check_bad_tree(self, tree, label): try: parser.sequence2st(tree) except parser.ParserError: pass else: self.fail("did not detect invalid tree for %r" % label) def test_junk(self): # not even remotely valid: self.check_bad_tree((1, 2, 3), "<junk>") def test_illegal_terminal(self): tree = \ (257, (269, (270, (271, (277, (1,))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "too small items in terminal node") tree = \ (257, (269, (270, (271, (277, (1, b'pass'))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "non-string second item in terminal node") tree = \ (257, (269, (270, (271, (277, (1, 'pass', '0', 0))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "non-integer third item in terminal node") tree = \ (257, (269, (270, (271, (277, (1, 'pass', 0, 0))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "too many items in terminal node") def test_illegal_yield_1(self): # Illegal yield statement: def f(): return 1; yield 1 tree = \ (257, (264, (285, (259, (1, 'def'), (1, 'f'), (260, (7, '('), (8, ')')), (11, ':'), (291, (4, ''), (5, ''), (264, (265, (266, (272, (275, (1, 'return'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (264, (265, (266, (272, (276, (1, 'yield'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (4, ''))), (6, ''))))), (4, ''), (0, '')))) self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_illegal_yield_2(self): # Illegal return in generator: def f(): return 1; yield 1 tree = \ (257, (264, (265, (266, (278, (1, 'from'), (281, (1, '__future__')), (1, 'import'), (279, (1, 'generators')))), (4, ''))), (264, (285, (259, (1, 'def'), (1, 'f'), (260, (7, '('), (8, ')')), (11, ':'), (291, (4, ''), (5, ''), (264, (265, (266, (272, (275, (1, 'return'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (264, (265, (266, (272, (276, (1, 'yield'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (4, ''))), (6, ''))))), (4, ''), (0, '')))) self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_a_comma_comma_c(self): # Illegal input: a,,c tree = \ (258, (311, (290, (291, (292, (293, (295, (296, (297, (298, (299, (300, (301, (302, (303, (1, 'a')))))))))))))), (12, ','), (12, ','), (290, (291, (292, (293, (295, (296, (297, (298, (299, (300, (301, (302, (303, (1, 'c'))))))))))))))), (4, ''), (0, '')) self.check_bad_tree(tree, "a,,c") def test_illegal_operator(self): # Illegal input: a $= b tree = \ (257, (264, (265, (266, (267, (312, (291, (292, (293, (294, (296, (297, (298, (299, (300, (301, (302, (303, (304, (1, 'a'))))))))))))))), (268, (37, '$=')), (312, (291, (292, (293, (294, (296, (297, (298, (299, (300, (301, (302, (303, (304, (1, 'b'))))))))))))))))), (4, ''))), (0, '')) self.check_bad_tree(tree, "a $= b") def test_malformed_global(self): #doesn't have global keyword in ast tree = (257, (264, (265, (266, (282, (1, 'foo'))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "malformed global ast") def test_missing_import_source(self): # from import fred tree = \ (257, (268, (269, (270, (282, (284, (1, 'from'), (1, 'import'), (287, (285, (1, 'fred')))))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "from import fred") def test_illegal_encoding(self): # Illegal encoding declaration tree = \ (338, (257, (0, ''))) self.check_bad_tree(tree, "missed encoding") tree = \ (338, (257, (0, '')), b'iso-8859-1') self.check_bad_tree(tree, "non-string encoding") tree = \ (338, (257, (0, '')), '\udcff') with self.assertRaises(UnicodeEncodeError): parser.sequence2st(tree) class CompileTestCase(unittest.TestCase): # These tests are very minimal. :-( def test_compile_expr(self): st = parser.expr('2 + 3') code = parser.compilest(st) self.assertEqual(eval(code), 5) def test_compile_suite(self): st = parser.suite('x = 2; y = x + 3') code = parser.compilest(st) globs = {} exec(code, globs) self.assertEqual(globs['y'], 5) def test_compile_error(self): st = parser.suite('1 = 3 + 4') self.assertRaises(SyntaxError, parser.compilest, st) def test_compile_badunicode(self): st = parser.suite('a = "\\U12345678"') self.assertRaises(SyntaxError, parser.compilest, st) st = parser.suite('a = "\\u1"') self.assertRaises(SyntaxError, parser.compilest, st) def test_issue_9011(self): # Issue 9011: compilation of an unary minus expression changed # the meaning of the ST, so that a second compilation produced # incorrect results. st = parser.expr('-3') code1 = parser.compilest(st) self.assertEqual(eval(code1), -3) code2 = parser.compilest(st) self.assertEqual(eval(code2), -3) def test_compile_filename(self): st = parser.expr('a + 5') code = parser.compilest(st) self.assertEqual(code.co_filename, '<syntax-tree>') code = st.compile() self.assertEqual(code.co_filename, '<syntax-tree>') for filename in ('file.py', b'file.py', bytearray(b'file.py'), memoryview(b'file.py')): code = parser.compilest(st, filename) self.assertEqual(code.co_filename, 'file.py') code = st.compile(filename) self.assertEqual(code.co_filename, 'file.py') self.assertRaises(TypeError, parser.compilest, st, list(b'file.py')) self.assertRaises(TypeError, st.compile, list(b'file.py')) class ParserStackLimitTestCase(unittest.TestCase): """try to push the parser to/over its limits. see http://bugs.python.org/issue1881 for a discussion """ def _nested_expression(self, level): return "["*level+"]"*level def test_deeply_nested_list(self): # XXX used to be 99 levels in 2.x e = self._nested_expression(93) st = parser.expr(e) st.compile() def test_trigger_memory_error(self): e = self._nested_expression(100) rc, out, err = assert_python_failure('-c', e) # parsing the expression will result in an error message # followed by a MemoryError (see #11963) self.assertIn(b's_push: parser stack overflow', err) self.assertIn(b'MemoryError', err) class STObjectTestCase(unittest.TestCase): """Test operations on ST objects themselves""" def test_comparisons(self): # ST objects should support order and equality comparisons st1 = parser.expr('2 + 3') st2 = parser.suite('x = 2; y = x + 3') st3 = parser.expr('list(x**3 for x in range(20))') st1_copy = parser.expr('2 + 3') st2_copy = parser.suite('x = 2; y = x + 3') st3_copy = parser.expr('list(x**3 for x in range(20))') # exercise fast path for object identity self.assertEqual(st1 == st1, True) self.assertEqual(st2 == st2, True) self.assertEqual(st3 == st3, True) # slow path equality self.assertEqual(st1, st1_copy) self.assertEqual(st2, st2_copy) self.assertEqual(st3, st3_copy) self.assertEqual(st1 == st2, False) self.assertEqual(st1 == st3, False) self.assertEqual(st2 == st3, False) self.assertEqual(st1 != st1, False) self.assertEqual(st2 != st2, False) self.assertEqual(st3 != st3, False) self.assertEqual(st1 != st1_copy, False) self.assertEqual(st2 != st2_copy, False) self.assertEqual(st3 != st3_copy, False) self.assertEqual(st2 != st1, True) self.assertEqual(st1 != st3, True) self.assertEqual(st3 != st2, True) # we don't particularly care what the ordering is; just that # it's usable and self-consistent self.assertEqual(st1 < st2, not (st2 <= st1)) self.assertEqual(st1 < st3, not (st3 <= st1)) self.assertEqual(st2 < st3, not (st3 <= st2)) self.assertEqual(st1 < st2, st2 > st1) self.assertEqual(st1 < st3, st3 > st1) self.assertEqual(st2 < st3, st3 > st2) self.assertEqual(st1 <= st2, st2 >= st1) self.assertEqual(st3 <= st1, st1 >= st3) self.assertEqual(st2 <= st3, st3 >= st2) # transitivity bottom = min(st1, st2, st3) top = max(st1, st2, st3) mid = sorted([st1, st2, st3])[1] self.assertTrue(bottom < mid) self.assertTrue(bottom < top) self.assertTrue(mid < top) self.assertTrue(bottom <= mid) self.assertTrue(bottom <= top) self.assertTrue(mid <= top) self.assertTrue(bottom <= bottom) self.assertTrue(mid <= mid) self.assertTrue(top <= top) # interaction with other types self.assertEqual(st1 == 1588.602459, False) self.assertEqual('spanish armada' != st2, True) self.assertRaises(TypeError, operator.ge, st3, None) self.assertRaises(TypeError, operator.le, False, st1) self.assertRaises(TypeError, operator.lt, st1, 1815) self.assertRaises(TypeError, operator.gt, b'waterloo', st2) def test_copy_pickle(self): sts = [ parser.expr('2 + 3'), parser.suite('x = 2; y = x + 3'), parser.expr('list(x**3 for x in range(20))') ] for st in sts: st_copy = copy.copy(st) self.assertEqual(st_copy.totuple(), st.totuple()) st_copy = copy.deepcopy(st) self.assertEqual(st_copy.totuple(), st.totuple()) for proto in range(pickle.HIGHEST_PROTOCOL+1): st_copy = pickle.loads(pickle.dumps(st, proto)) self.assertEqual(st_copy.totuple(), st.totuple()) check_sizeof = support.check_sizeof @support.cpython_only def test_sizeof(self): def XXXROUNDUP(n): if n <= 1: return n if n <= 128: return (n + 3) & ~3 return 1 << (n - 1).bit_length() basesize = support.calcobjsize('Pii') nodesize = struct.calcsize('hP3iP0h') def sizeofchildren(node): if node is None: return 0 res = 0 hasstr = len(node) > 1 and isinstance(node[-1], str) if hasstr: res += len(node[-1]) + 1 children = node[1:-1] if hasstr else node[1:] if children: res += XXXROUNDUP(len(children)) * nodesize for child in children: res += sizeofchildren(child) return res def check_st_sizeof(st): self.check_sizeof(st, basesize + nodesize + sizeofchildren(st.totuple())) check_st_sizeof(parser.expr('2 + 3')) check_st_sizeof(parser.expr('2 + 3 + 4')) check_st_sizeof(parser.suite('x = 2 + 3')) check_st_sizeof(parser.suite('')) check_st_sizeof(parser.suite('# -*- coding: utf-8 -*-')) check_st_sizeof(parser.expr('[' + '2,' * 1000 + ']')) # XXX tests for pickling and unpickling of ST objects should go here class OtherParserCase(unittest.TestCase): def test_two_args_to_expr(self): # See bug #12264 with self.assertRaises(TypeError): parser.expr("a", "b") if __name__ == "__main__": unittest.main()