summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-11-20 13:12:05 -0500
committerJason R. Coombs <jaraco@jaraco.com>2017-11-20 13:12:05 -0500
commit89ef5bb7e4812193d6f593d531bad36191517981 (patch)
tree1c5dccb410d9a740d1461cd07249af4c233ad120 /setuptools/tests
parent45ec75beccba6432b3ed7b80fd84b65276453e9d (diff)
parentc6fe76cbc22ac6ac64709a0381a6ce48a8c9884a (diff)
downloadpython-setuptools-git-89ef5bb7e4812193d6f593d531bad36191517981.tar.gz
Drop support for Python 2.6 by merging the drop-py26 branch. Fixes #878.
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/py26compat.py16
-rw-r--r--setuptools/tests/test_develop.py2
-rw-r--r--setuptools/tests/test_easy_install.py5
-rw-r--r--setuptools/tests/test_egg_info.py9
4 files changed, 4 insertions, 28 deletions
diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
deleted file mode 100644
index 18cece05..00000000
--- a/setuptools/tests/py26compat.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import sys
-import tarfile
-import contextlib
-
-
-def _tarfile_open_ex(*args, **kwargs):
- """
- Extend result as a context manager.
- """
- return contextlib.closing(tarfile.open(*args, **kwargs))
-
-
-if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2):
- tarfile_open = _tarfile_open_ex
-else:
- tarfile_open = tarfile.open
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
index 35ea1403..00d4bd9a 100644
--- a/setuptools/tests/test_develop.py
+++ b/setuptools/tests/test_develop.py
@@ -178,7 +178,7 @@ class TestNamespaces:
install_cmd = [
sys.executable,
'-m',
- 'pip.__main__',
+ 'pip',
'install',
str(pkg_A),
'-t', str(target),
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 1d3390c5..834710ef 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -33,7 +33,6 @@ import setuptools.tests.server
from setuptools.tests import fail_on_ascii
import pkg_resources
-from .py26compat import tarfile_open
from . import contexts
from .textwrap import DALS
@@ -432,7 +431,7 @@ class TestSetupRequires:
# extracted path to sys.path so foo.bar v0.1 is importable
foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1')
os.mkdir(foobar_1_dir)
- with tarfile_open(foobar_1_archive) as tf:
+ with tarfile.open(foobar_1_archive) as tf:
tf.extractall(foobar_1_dir)
sys.path.insert(1, foobar_1_dir)
@@ -563,7 +562,7 @@ def make_sdist(dist_path, files):
listed in ``files`` as ``(filename, content)`` tuples.
"""
- with tarfile_open(dist_path, 'w:gz') as dist:
+ with tarfile.open(dist_path, 'w:gz') as dist:
for filename, content in files:
file_bytes = io.BytesIO(content.encode('utf-8'))
file_info = tarfile.TarInfo(name=filename)
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index 1411f93c..a97d0c84 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -1,9 +1,9 @@
+import sys
import ast
import os
import glob
import re
import stat
-import sys
from setuptools.command.egg_info import egg_info, manifest_maker
from setuptools.dist import Distribution
@@ -64,12 +64,6 @@ class TestEggInfo(object):
})
yield env
- dict_order_fails = pytest.mark.skipif(
- sys.version_info < (2, 7),
- reason="Intermittent failures on Python 2.6",
- )
-
- @dict_order_fails
def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env):
"""
When the egg_info section is empty or not present, running
@@ -104,7 +98,6 @@ class TestEggInfo(object):
flags = re.MULTILINE | re.DOTALL
assert re.search(pattern, content, flags)
- @dict_order_fails
def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env):
"""
When running save_version_info on an existing setup.cfg