aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/py26compat.py16
-rw-r--r--setuptools/tests/test_easy_install.py7
-rw-r--r--setuptools/tests/test_egg_info.py8
3 files changed, 3 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_easy_install.py b/setuptools/tests/test_easy_install.py
index 209e6b78..6f9bc8e1 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -35,7 +35,6 @@ from pkg_resources import Distribution as PRDistribution
import setuptools.tests.server
import pkg_resources
-from .py26compat import tarfile_open
from . import contexts
from .textwrap import DALS
@@ -428,7 +427,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)
@@ -526,7 +525,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)
@@ -580,7 +579,7 @@ def make_trivial_sdist(dist_path, setup_py):
setup_py_file = tarfile.TarInfo(name='setup.py')
setup_py_bytes = io.BytesIO(setup_py.encode('utf-8'))
setup_py_file.size = len(setup_py_bytes.getvalue())
- with tarfile_open(dist_path, 'w:gz') as dist:
+ with tarfile.open(dist_path, 'w:gz') as dist:
dist.addfile(setup_py_file, fileobj=setup_py_bytes)
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index 75ae18df..7bf6b68a 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -2,7 +2,6 @@ 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
@@ -63,12 +62,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 +97,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