Skip to content

Commit a0e8e53

Browse files
committed
Skip an additional test under xdist. Ref pypa/distutils#183. Expanded workaround for pytest-dev/pytest-xdist#843.
1 parent 515c0ae commit a0e8e53

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

setuptools/tests/test_sdist.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ def latin1_fail():
8989
)
9090

9191

92+
skip_under_xdist = pytest.mark.skipif(
93+
"os.environ.get('PYTEST_XDIST_WORKER')",
94+
reason="pytest-dev/pytest-xdist#843",
95+
)
96+
97+
9298
def touch(path):
9399
path.write_text('', encoding='utf-8')
94100

@@ -322,10 +328,7 @@ def test_write_manifest_allows_utf8_filenames(self):
322328
# The filelist should have been updated as well
323329
assert u_filename in mm.filelist.files
324330

325-
@pytest.mark.skipif(
326-
"os.environ.get('PYTEST_XDIST_WORKER')",
327-
reason="pytest-dev/pytest-xdist#843",
328-
)
331+
@skip_under_xdist
329332
def test_write_manifest_skips_non_utf8_filenames(self):
330333
"""
331334
Files that cannot be encoded to UTF-8 (specifically, those that
@@ -464,6 +467,7 @@ def make_strings(cls, item):
464467
return str(item)
465468

466469
@fail_on_latin1_encoded_filenames
470+
@skip_under_xdist
467471
def test_sdist_with_latin1_encoded_filename(self):
468472
# Test for #303.
469473
dist = Distribution(self.make_strings(SETUP_ATTRS))

0 commit comments

Comments
 (0)