PATH: //opt/alt/python311/lib64/python3.11/test/test_importlib
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📄 __main__.py
↓
X
📁 __pycache__/
X
📄 abc.py
↓
X
📁 builtin/
X
📁 data/
X
📁 data01/
X
📁 data02/
X
📁 data03/
X
📁 extension/
X
📄 fixtures.py
↓
X
📁 frozen/
X
📁 import_/
X
📁 namespace_pkgs/
X
📁 namespacedata01/
X
📁 partial/
X
📁 resources/
X
📁 source/
X
📄 stubs.py
↓
X
📄 test_abc.py
↓
X
📄 test_api.py
↓
X
📄 test_compatibilty_files.py
↓
X
📄 test_contents.py
↓
X
📄 test_files.py
↓
X
📄 test_lazy.py
↓
X
📄 test_locks.py
↓
X
📄 test_main.py
↓
X
📄 test_metadata_api.py
↓
X
📄 test_namespace_pkgs.py
↓
X
📄 test_open.py
↓
X
📄 test_path.py
↓
X
📄 test_pkg_import.py
↓
X
📄 test_read.py
↓
X
📄 test_reader.py
↓
X
📄 test_resource.py
↓
X
📄 test_spec.py
↓
X
📄 test_threaded_import.py
↓
X
📄 test_util.py
↓
X
📄 test_windows.py
↓
X
📄 test_zip.py
↓
X
📄 threaded_import_hangers.py
↓
X
📄 update-zips.py
↓
X
📄 util.py
↓
X
📁 zipdata01/
X
📁 zipdata02/
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_zip.py
import sys import unittest from . import fixtures from importlib.metadata import ( PackageNotFoundError, distribution, distributions, entry_points, files, version, ) class TestZip(fixtures.ZipFixtures, unittest.TestCase): def setUp(self): super().setUp() self._fixture_on_path('example-21.12-py3-none-any.whl') def test_zip_version(self): self.assertEqual(version('example'), '21.12') def test_zip_version_does_not_match(self): with self.assertRaises(PackageNotFoundError): version('definitely-not-installed') def test_zip_entry_points(self): scripts = entry_points(group='console_scripts') entry_point = scripts['example'] self.assertEqual(entry_point.value, 'example:main') entry_point = scripts['Example'] self.assertEqual(entry_point.value, 'example:main') def test_missing_metadata(self): self.assertIsNone(distribution('example').read_text('does not exist')) def test_case_insensitive(self): self.assertEqual(version('Example'), '21.12') def test_files(self): for file in files('example'): path = str(file.dist.locate_file(file)) assert '.whl/' in path, path def test_one_distribution(self): dists = list(distributions(path=sys.path[:1])) assert len(dists) == 1 class TestEgg(TestZip): def setUp(self): super().setUp() self._fixture_on_path('example-21.12-py3.6.egg') def test_files(self): for file in files('example'): path = str(file.dist.locate_file(file)) assert '.egg/' in path, path def test_normalized_name(self): dist = distribution('example') assert dist._normalized_name == 'example'
SIMPAN PERUBAHAN