Current Path: > > opt > cloudlinux > venv > lib > > python3.11 > site-packages > pkg_resources > tests
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
data | Directory | - | - | |
__init__.py | File | 0 bytes | April 17 2025 13:10:58. | |
test_find_distributions.py | File | 1972 bytes | April 17 2025 13:10:58. | |
test_integration_zope_interface.py | File | 1652 bytes | April 17 2025 13:10:58. | |
test_markers.py | File | 241 bytes | April 17 2025 13:10:58. | |
test_pkg_resources.py | File | 17111 bytes | April 17 2025 13:10:58. | |
test_resources.py | File | 31252 bytes | April 17 2025 13:10:58. | |
test_working_set.py | File | 8602 bytes | April 17 2025 13:10:58. |
import shutil from pathlib import Path import pytest import pkg_resources TESTS_DATA_DIR = Path(__file__).parent / 'data' class TestFindDistributions: @pytest.fixture def target_dir(self, tmpdir): target_dir = tmpdir.mkdir('target') # place a .egg named directory in the target that is not an egg: target_dir.mkdir('not.an.egg') return target_dir def test_non_egg_dir_named_egg(self, target_dir): dists = pkg_resources.find_distributions(str(target_dir)) assert not list(dists) def test_standalone_egg_directory(self, target_dir): shutil.copytree( TESTS_DATA_DIR / 'my-test-package_unpacked-egg', target_dir, dirs_exist_ok=True, ) dists = pkg_resources.find_distributions(str(target_dir)) assert [dist.project_name for dist in dists] == ['my-test-package'] dists = pkg_resources.find_distributions(str(target_dir), only=True) assert not list(dists) def test_zipped_egg(self, target_dir): shutil.copytree( TESTS_DATA_DIR / 'my-test-package_zipped-egg', target_dir, dirs_exist_ok=True, ) dists = pkg_resources.find_distributions(str(target_dir)) assert [dist.project_name for dist in dists] == ['my-test-package'] dists = pkg_resources.find_distributions(str(target_dir), only=True) assert not list(dists) def test_zipped_sdist_one_level_removed(self, target_dir): shutil.copytree( TESTS_DATA_DIR / 'my-test-package-zip', target_dir, dirs_exist_ok=True ) dists = pkg_resources.find_distributions( str(target_dir / "my-test-package.zip") ) assert [dist.project_name for dist in dists] == ['my-test-package'] dists = pkg_resources.find_distributions( str(target_dir / "my-test-package.zip"), only=True ) assert not list(dists)
SILENT KILLER Tool