diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-11 15:30:09 +0200 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-11 15:30:09 +0200 |
| commit | a85c59d34bbb232fc110714dc3aeb3c823a6f3cb (patch) | |
| tree | a45c5491b600f3dca768a17690f08c0a241b3af8 /setuptools/tests/test_sdist.py | |
| parent | 5e6d72b852229750d00023885a6ce6149060d08a (diff) | |
| download | external_python_setuptools-a85c59d34bbb232fc110714dc3aeb3c823a6f3cb.tar.gz external_python_setuptools-a85c59d34bbb232fc110714dc3aeb3c823a6f3cb.tar.bz2 external_python_setuptools-a85c59d34bbb232fc110714dc3aeb3c823a6f3cb.zip | |
Expect failure on macOS 10.13 and other operating systems where writing latin-1 encoded filenames is prohibited. Fixes #1169.
Diffstat (limited to 'setuptools/tests/test_sdist.py')
| -rw-r--r-- | setuptools/tests/test_sdist.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index e7fc71e3..3b9a3b94 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -80,6 +80,21 @@ def read_all_bytes(filename): return fp.read() +def latin1_fail(): + try: + desc, filename = tempfile.mkstemp(suffix=LATIN1_FILENAME) + os.close(desc) + os.remove(filename) + except Exception: + return True + + +fail_on_latin1_encoded_filenames = pytest.mark.xfail( + latin1_fail(), + reason="System does not support latin-1 filenames", +) + + class TestSdistTest: def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() @@ -290,6 +305,7 @@ class TestSdistTest: assert filename in cmd.filelist.files @py3_only + @fail_on_latin1_encoded_filenames def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -321,6 +337,7 @@ class TestSdistTest: assert filename not in cmd.filelist.files @fail_on_ascii + @fail_on_latin1_encoded_filenames def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -355,6 +372,7 @@ class TestSdistTest: else: assert filename in cmd.filelist.files + @fail_on_latin1_encoded_filenames def test_sdist_with_latin1_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) |
