diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-07-13 15:44:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 15:44:44 -0400 |
commit | abe31ce06a72b01bd86552ab5253209479428e35 (patch) | |
tree | 4d59968bb17cca9e6c3b1c676981f67250262210 | |
parent | cf3e1b296a8d7cea519ef07b041c30ec891f9f18 (diff) | |
parent | 100b73452e6e5e3b60ce8d0887e39f9af1d10899 (diff) | |
download | external_python_setuptools-abe31ce06a72b01bd86552ab5253209479428e35.tar.gz external_python_setuptools-abe31ce06a72b01bd86552ab5253209479428e35.tar.bz2 external_python_setuptools-abe31ce06a72b01bd86552ab5253209479428e35.zip |
Merge pull request #1070 from benoit-pierre/tests_releated_fixes_and_tweaks
Tests releated fixes and tweaks
-rw-r--r-- | .travis.yml | 4 | ||||
-rwxr-xr-x | pytest.ini | 2 | ||||
-rw-r--r-- | setuptools/tests/__init__.py | 4 | ||||
-rw-r--r-- | setuptools/tests/test_easy_install.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 4a9a861f..448d6312 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,9 @@ python: matrix: include: - python: 3.6 - env: LC_ALL=C LC_CTYPE=C + env: LANG=C - python: 2.7 - env: LC_ALL=C LC_CTYPE=C + env: LANG=C script: # need tox to get started - pip install tox @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py -rsxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index dbf16201..8ae4402d 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -1,4 +1,5 @@ """Tests for the 'setuptools' package""" +import locale import sys import os import distutils.core @@ -16,8 +17,7 @@ import setuptools.depends as dep from setuptools import Feature from setuptools.depends import Require -c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) -is_ascii = c_type in ("C", "POSIX") +is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968' fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2d9682a9..1b7178a1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -30,6 +30,7 @@ from setuptools.dist import Distribution from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution import setuptools.tests.server +from setuptools.tests import fail_on_ascii import pkg_resources from .py26compat import tarfile_open @@ -166,6 +167,7 @@ class TestEasyInstallTest: sdist_zip.close() return str(sdist) + @fail_on_ascii def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if @@ -7,5 +7,5 @@ [testenv] deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR -commands=py.test {posargs:-rsx} +commands=py.test {posargs} usedevelop=True |