Skip to content

Commit

Permalink
Skip an additional test under xdist. Ref pypa/distutils#183. Expanded…
Browse files Browse the repository at this point in the history
… workaround for pytest-dev/pytest-xdist#843.
  • Loading branch information
jaraco committed Nov 13, 2022
1 parent 515c0ae commit a0e8e53
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions setuptools/tests/test_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit a0e8e53

Please sign in to comment.