/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
setuptools
/
_distutils
/
tests
/
/opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/_distutils/tests
mkdir
upload
Name
Size
Mode
Actions
compat/
-
0755
rm
__pycache__/
-
0755
rm
support.py
4099
0644
edit
dl
rm
test_archive_util.py
11441
0644
edit
dl
rm
test_bdist.py
1396
0644
edit
dl
rm
test_bdist_dumb.py
2247
0644
edit
dl
rm
test_bdist_rpm.py
3932
0644
edit
dl
rm
test_build.py
1742
0644
edit
dl
rm
test_build_clib.py
4331
0644
edit
dl
rm
test_build_ext.py
22545
0644
edit
dl
rm
test_build_py.py
6882
0644
edit
dl
rm
test_build_scripts.py
2880
0644
edit
dl
rm
test_check.py
6226
0644
edit
dl
rm
test_clean.py
1240
0644
edit
dl
rm
test_cmd.py
3254
0644
edit
dl
rm
test_config_cmd.py
2664
0644
edit
dl
rm
test_core.py
3829
0644
edit
dl
rm
test_dir_util.py
4500
0644
edit
dl
rm
test_dist.py
18793
0644
edit
dl
rm
test_extension.py
3670
0644
edit
dl
rm
test_filelist.py
10766
0644
edit
dl
rm
test_file_util.py
3522
0644
edit
dl
rm
test_install.py
8618
0644
edit
dl
rm
test_install_data.py
2464
0644
edit
dl
rm
test_install_headers.py
936
0644
edit
dl
rm
test_install_lib.py
3612
0644
edit
dl
rm
test_install_scripts.py
1600
0644
edit
dl
rm
test_log.py
323
0644
edit
dl
rm
test_modified.py
4221
0644
edit
dl
rm
test_sdist.py
15062
0644
edit
dl
rm
test_spawn.py
4803
0644
edit
dl
rm
test_sysconfig.py
11986
0644
edit
dl
rm
test_text_file.py
3460
0644
edit
dl
rm
test_util.py
7988
0644
edit
dl
rm
test_version.py
2750
0644
edit
dl
rm
test_versionpredicate.py
0
0644
edit
dl
rm
unix_compat.py
386
0644
edit
dl
rm
__init__.py
1485
0644
edit
dl
rm
Edit:
/opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/_distutils/tests/test_bdist_dumb.py
(2247B)
"""Tests for distutils.command.bdist_dumb.""" import os import sys import zipfile from distutils.command.bdist_dumb import bdist_dumb from distutils.core import Distribution from distutils.tests import support import pytest SETUP_PY = """\ from distutils.core import setup import foo setup(name='foo', version='0.1', py_modules=['foo'], url='xxx', author='xxx', author_email='xxx') """ @support.combine_markers @pytest.mark.usefixtures('save_env') @pytest.mark.usefixtures('save_argv') @pytest.mark.usefixtures('save_cwd') class TestBuildDumb( support.TempdirManager, ): @pytest.mark.usefixtures('needs_zlib') def test_simple_built(self): # let's create a simple package tmp_dir = self.mkdtemp() pkg_dir = os.path.join(tmp_dir, 'foo') os.mkdir(pkg_dir) self.write_file((pkg_dir, 'setup.py'), SETUP_PY) self.write_file((pkg_dir, 'foo.py'), '#') self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') self.write_file((pkg_dir, 'README'), '') dist = Distribution({ 'name': 'foo', 'version': '0.1', 'py_modules': ['foo'], 'url': 'xxx', 'author': 'xxx', 'author_email': 'xxx', }) dist.script_name = 'setup.py' os.chdir(pkg_dir) sys.argv = ['setup.py'] cmd = bdist_dumb(dist) # so the output is the same no matter # what is the platform cmd.format = 'zip' cmd.ensure_finalized() cmd.run() # see what we have dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) base = f"{dist.get_fullname()}.{cmd.plat_name}.zip" assert dist_created == [base] # now let's check what we have in the zip file fp = zipfile.ZipFile(os.path.join('dist', base)) try: contents = fp.namelist() finally: fp.close() contents = sorted(filter(None, map(os.path.basename, contents))) wanted = ['foo-0.1-py{}.{}.egg-info'.format(*sys.version_info[:2]), 'foo.py'] if not sys.dont_write_bytecode: wanted.append(f'foo.{sys.implementation.cache_tag}.pyc') assert contents == sorted(wanted)
Save
cmd:
run