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.122
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
lib /
python3.10 /
test /
test_importlib /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
builtin
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
data
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
data01
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
data02
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
data03
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
extension
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
frozen
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
import_
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
namespace_pkgs
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
namespacedata01
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
partial
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
source
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
zipdata01
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
zipdata02
[ DIR ]
drwxr-sr-x
2025-06-04 09:23
__init__.py
142
B
-rw-r--r--
2025-06-04 09:23
__main__.py
58
B
-rw-r--r--
2025-06-04 09:23
abc.py
2.22
KB
-rw-r--r--
2025-06-04 09:23
fixtures.py
7.28
KB
-rw-r--r--
2025-06-04 09:23
stubs.py
233
B
-rw-r--r--
2025-06-04 09:23
test_abc.py
34.19
KB
-rw-r--r--
2025-06-04 09:23
test_api.py
18.59
KB
-rw-r--r--
2025-06-04 09:23
test_files.py
1011
B
-rw-r--r--
2025-06-04 09:23
test_lazy.py
4.81
KB
-rw-r--r--
2025-06-04 09:23
test_locks.py
4.41
KB
-rw-r--r--
2025-06-04 09:23
test_main.py
8.75
KB
-rw-r--r--
2025-06-04 09:23
test_metadata_api.py
11.41
KB
-rw-r--r--
2025-06-04 09:23
test_namespace_pkgs.py
12.11
KB
-rw-r--r--
2025-06-04 09:23
test_open.py
2.31
KB
-rw-r--r--
2025-06-04 09:23
test_path.py
1.88
KB
-rw-r--r--
2025-06-04 09:23
test_pkg_import.py
2.69
KB
-rw-r--r--
2025-06-04 09:23
test_read.py
1.94
KB
-rw-r--r--
2025-06-04 09:23
test_reader.py
4.18
KB
-rw-r--r--
2025-06-04 09:23
test_resource.py
8.18
KB
-rw-r--r--
2025-06-04 09:23
test_spec.py
30.88
KB
-rw-r--r--
2025-06-04 09:23
test_threaded_import.py
9.49
KB
-rw-r--r--
2025-06-04 09:23
test_util.py
34.67
KB
-rw-r--r--
2025-06-04 09:23
test_windows.py
7.26
KB
-rw-r--r--
2025-06-04 09:23
test_zip.py
2.61
KB
-rw-r--r--
2025-06-04 09:23
threaded_import_hangers.py
1.45
KB
-rw-r--r--
2025-06-04 09:23
update-zips.py
1.38
KB
-rwxr-xr-x
2025-06-04 09:23
util.py
18.22
KB
-rw-r--r--
2025-06-04 09:23
Save
Rename
import os.path import sys import pathlib import unittest from importlib import import_module from importlib.readers import MultiplexedPath, NamespaceReader class MultiplexedPathTest(unittest.TestCase): @classmethod def setUpClass(cls): path = pathlib.Path(__file__).parent / 'namespacedata01' cls.folder = str(path) def test_init_no_paths(self): with self.assertRaises(FileNotFoundError): MultiplexedPath() def test_init_file(self): with self.assertRaises(NotADirectoryError): MultiplexedPath(os.path.join(self.folder, 'binary.file')) def test_iterdir(self): contents = {path.name for path in MultiplexedPath(self.folder).iterdir()} try: contents.remove('__pycache__') except (KeyError, ValueError): pass self.assertEqual(contents, {'binary.file', 'utf-16.file', 'utf-8.file'}) def test_iterdir_duplicate(self): data01 = os.path.abspath(os.path.join(__file__, '..', 'data01')) contents = { path.name for path in MultiplexedPath(self.folder, data01).iterdir() } for remove in ('__pycache__', '__init__.pyc'): try: contents.remove(remove) except (KeyError, ValueError): pass self.assertEqual( contents, {'__init__.py', 'binary.file', 'subdirectory', 'utf-16.file', 'utf-8.file'}, ) def test_is_dir(self): self.assertEqual(MultiplexedPath(self.folder).is_dir(), True) def test_is_file(self): self.assertEqual(MultiplexedPath(self.folder).is_file(), False) def test_open_file(self): path = MultiplexedPath(self.folder) with self.assertRaises(FileNotFoundError): path.read_bytes() with self.assertRaises(FileNotFoundError): path.read_text() with self.assertRaises(FileNotFoundError): path.open() def test_join_path(self): prefix = os.path.abspath(os.path.join(__file__, '..')) data01 = os.path.join(prefix, 'data01') path = MultiplexedPath(self.folder, data01) self.assertEqual( str(path.joinpath('binary.file'))[len(prefix) + 1 :], os.path.join('namespacedata01', 'binary.file'), ) self.assertEqual( str(path.joinpath('subdirectory'))[len(prefix) + 1 :], os.path.join('data01', 'subdirectory'), ) self.assertEqual( str(path.joinpath('imaginary'))[len(prefix) + 1 :], os.path.join('namespacedata01', 'imaginary'), ) def test_repr(self): self.assertEqual( repr(MultiplexedPath(self.folder)), f"MultiplexedPath('{self.folder}')", ) def test_name(self): self.assertEqual( MultiplexedPath(self.folder).name, os.path.basename(self.folder), ) class NamespaceReaderTest(unittest.TestCase): site_dir = str(pathlib.Path(__file__).parent) @classmethod def setUpClass(cls): sys.path.append(cls.site_dir) @classmethod def tearDownClass(cls): sys.path.remove(cls.site_dir) def test_init_error(self): with self.assertRaises(ValueError): NamespaceReader(['path1', 'path2']) def test_resource_path(self): namespacedata01 = import_module('namespacedata01') reader = NamespaceReader(namespacedata01.__spec__.submodule_search_locations) root = os.path.abspath(os.path.join(__file__, '..', 'namespacedata01')) self.assertEqual( reader.resource_path('binary.file'), os.path.join(root, 'binary.file') ) self.assertEqual( reader.resource_path('imaginary'), os.path.join(root, 'imaginary') ) def test_files(self): namespacedata01 = import_module('namespacedata01') reader = NamespaceReader(namespacedata01.__spec__.submodule_search_locations) root = os.path.abspath(os.path.join(__file__, '..', 'namespacedata01')) self.assertIsInstance(reader.files(), MultiplexedPath) self.assertEqual(repr(reader.files()), f"MultiplexedPath('{root}')") if __name__ == '__main__': unittest.main()