summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2020-01-07 22:04:58 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2020-01-21 23:17:45 +0200
commit7aee5e88c50e6f4f1225013f2a844ba0f3dc5d47 (patch)
treedead8fe582e235644b6dfd6a735a5157c06b117d /tests
parent6c8effd79d2c71b768ac606c6b28579433ec62fd (diff)
downloadwheel-git-7aee5e88c50e6f4f1225013f2a844ba0f3dc5d47.tar.gz
Skip unicode dist and related test on Python < 3.6
Due to encoding issues, this ends up failing in certain cases and there is nothing wheel can do about it.
Diffstat (limited to 'tests')
-rw-r--r--tests/conftest.py7
-rw-r--r--tests/test_bdist_wheel.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 1b8aa99..eb85272 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -12,7 +12,12 @@ import pytest
@pytest.fixture(scope='session')
def wheels_and_eggs(tmpdir_factory):
"""Build wheels and eggs from test distributions."""
- test_distributions = "complex-dist", "simple.dist", "headers.dist", "unicode.dist"
+ test_distributions = "complex-dist", "simple.dist", "headers.dist"
+ if sys.version_info >= (3, 6):
+ # Only Python 3.6+ can handle packaging unicode file names reliably
+ # across different platforms
+ test_distributions += ("unicode.dist",)
+
pwd = os.path.abspath(os.curdir)
this_dir = os.path.dirname(__file__)
build_dir = tmpdir_factory.mktemp('build')
diff --git a/tests/test_bdist_wheel.py b/tests/test_bdist_wheel.py
index 40ce37f..729a6a2 100644
--- a/tests/test_bdist_wheel.py
+++ b/tests/test_bdist_wheel.py
@@ -45,6 +45,8 @@ def test_no_scripts(wheel_paths):
assert '.data/scripts/' not in entry.filename
+@pytest.mark.skipif(sys.version_info < (3, 6),
+ reason='Packaging unicode file names only works reliably on Python 3.6+')
def test_unicode_record(wheel_paths):
path = next(path for path in wheel_paths if 'unicode.dist' in path)
with ZipFile(path) as zf: