PATH: //opt/cloudlinux/venv/lib64/python3.11/site-packages/setuptools/tests
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
π __init__.py
β
X
π __pycache__/
X
π compat/
X
π config/
X
π contexts.py
β
X
π environment.py
β
X
π fixtures.py
β
X
π indexes/
X
π integration/
X
π mod_with_constant.py
β
X
π namespaces.py
β
X
π script-with-bom.py
β
X
π server.py
β
X
π test_archive_util.py
β
X
π test_bdist_deprecations.py
β
X
π test_bdist_egg.py
β
X
π test_bdist_wheel.py
β
X
π test_build.py
β
X
π test_build_clib.py
β
X
π test_build_ext.py
β
X
π test_build_meta.py
β
X
π test_build_py.py
β
X
π test_config_discovery.py
β
X
π test_core_metadata.py
β
X
π test_depends.py
β
X
π test_develop.py
β
X
π test_dist.py
β
X
π test_dist_info.py
β
X
π test_distutils_adoption.py
β
X
π test_easy_install.py
β
X
π test_editable_install.py
β
X
π test_egg_info.py
β
X
π test_extern.py
β
X
π test_find_packages.py
β
X
π test_find_py_modules.py
β
X
π test_glob.py
β
X
π test_install_scripts.py
β
X
π test_logging.py
β
X
π test_manifest.py
β
X
π test_namespaces.py
β
X
π test_packageindex.py
β
X
π test_sandbox.py
β
X
π test_sdist.py
β
X
π test_setopt.py
β
X
π test_setuptools.py
β
X
π test_shutil_wrapper.py
β
X
π test_unicode_utils.py
β
X
π test_virtualenv.py
β
X
π test_warnings.py
β
X
π test_wheel.py
β
X
π test_windows_wrappers.py
β
X
π text.py
β
X
π textwrap.py
β
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_setopt.py
import configparser from setuptools.command import setopt class TestEdit: @staticmethod def parse_config(filename): parser = configparser.ConfigParser() with open(filename, encoding='utf-8') as reader: parser.read_file(reader) return parser @staticmethod def write_text(file, content): with open(file, 'wb') as strm: strm.write(content.encode('utf-8')) def test_utf8_encoding_retained(self, tmpdir): """ When editing a file, non-ASCII characters encoded in UTF-8 should be retained. """ config = tmpdir.join('setup.cfg') self.write_text(str(config), '[names]\njaraco=Π΄ΠΆΠ°ΡΠ°ΠΊΠΎ') setopt.edit_config(str(config), dict(names=dict(other='yes'))) parser = self.parse_config(str(config)) assert parser.get('names', 'jaraco') == 'Π΄ΠΆΠ°ΡΠ°ΠΊΠΎ' assert parser.get('names', 'other') == 'yes' def test_case_retained(self, tmpdir): """ When editing a file, case of keys should be retained. """ config = tmpdir.join('setup.cfg') self.write_text(str(config), '[names]\nFoO=bAr') setopt.edit_config(str(config), dict(names=dict(oTher='yes'))) actual = config.read_text(encoding='ascii') assert 'FoO' in actual assert 'oTher' in actual
SIMPAN PERUBAHAN