/opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/_distutils/tests
"""Tests for distutils.command.clean.""" import os from distutils.command.clean import clean from distutils.tests import support class TestClean(support.TempdirManager): def test_simple_run(self): pkg_dir, dist = self.create_dist() cmd = clean(dist) # let's add some elements clean should remove dirs = [ (d, os.path.join(pkg_dir, d)) for d in ( 'build_temp', 'build_lib', 'bdist_base', 'build_scripts', 'build_base', ) ] for name, path in dirs: os.mkdir(path) setattr(cmd, name, path) if name == 'build_base': continue for f in ('one', 'two', 'three'): self.write_file(os.path.join(path, f)) # let's run the command cmd.all = 1 cmd.ensure_finalized() cmd.run() # make sure the files where removed for _name, path in dirs: assert not os.path.exists(path), f'{path} was not removed' # let's run the command again (should spit warnings but succeed) cmd.all = 1 cmd.ensure_finalized() cmd.run()
.
Edit
..
Edit
__init__.py
Edit
__pycache__
Edit
compat
Edit
support.py
Edit
test_archive_util.py
Edit
test_bdist.py
Edit
test_bdist_dumb.py
Edit
test_bdist_rpm.py
Edit
test_build.py
Edit
test_build_clib.py
Edit
test_build_ext.py
Edit
test_build_py.py
Edit
test_build_scripts.py
Edit
test_check.py
Edit
test_clean.py
Edit
test_cmd.py
Edit
test_config_cmd.py
Edit
test_core.py
Edit
test_dir_util.py
Edit
test_dist.py
Edit
test_extension.py
Edit
test_file_util.py
Edit
test_filelist.py
Edit
test_install.py
Edit
test_install_data.py
Edit
test_install_headers.py
Edit
test_install_lib.py
Edit
test_install_scripts.py
Edit
test_log.py
Edit
test_modified.py
Edit
test_sdist.py
Edit
test_spawn.py
Edit
test_sysconfig.py
Edit
test_text_file.py
Edit
test_util.py
Edit
test_version.py
Edit
test_versionpredicate.py
Edit
unix_compat.py
Edit