diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index adf4325d61..30631c2429 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -89,6 +89,12 @@ def latin1_fail(): ) +skip_under_xdist = pytest.mark.skipif( + "os.environ.get('PYTEST_XDIST_WORKER')", + reason="pytest-dev/pytest-xdist#843", +) + + def touch(path): path.write_text('', encoding='utf-8') @@ -322,10 +328,7 @@ def test_write_manifest_allows_utf8_filenames(self): # The filelist should have been updated as well assert u_filename in mm.filelist.files - @pytest.mark.skipif( - "os.environ.get('PYTEST_XDIST_WORKER')", - reason="pytest-dev/pytest-xdist#843", - ) + @skip_under_xdist def test_write_manifest_skips_non_utf8_filenames(self): """ Files that cannot be encoded to UTF-8 (specifically, those that @@ -464,6 +467,7 @@ def make_strings(cls, item): return str(item) @fail_on_latin1_encoded_filenames + @skip_under_xdist def test_sdist_with_latin1_encoded_filename(self): # Test for #303. dist = Distribution(self.make_strings(SETUP_ATTRS))