aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-07-13 15:44:44 -0400
committerGitHub <noreply@github.com>2017-07-13 15:44:44 -0400
commitabe31ce06a72b01bd86552ab5253209479428e35 (patch)
tree4d59968bb17cca9e6c3b1c676981f67250262210
parentcf3e1b296a8d7cea519ef07b041c30ec891f9f18 (diff)
parent100b73452e6e5e3b60ce8d0887e39f9af1d10899 (diff)
downloadexternal_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.yml4
-rwxr-xr-xpytest.ini2
-rw-r--r--setuptools/tests/__init__.py4
-rw-r--r--setuptools/tests/test_easy_install.py2
-rw-r--r--tox.ini2
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
diff --git a/pytest.ini b/pytest.ini
index 11a213db..16fdc5af 100755
--- a/pytest.ini
+++ b/pytest.ini
@@ -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
diff --git a/tox.ini b/tox.ini
index c3ea462b..4b4b4fd8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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