Mark tests that require an active internet connection
as expected failures. Remove obsolete patch.
This commit is contained in:
parent
1c591cc3de
commit
70bb4d58ff
@ -1,58 +0,0 @@
|
||||
From 62effe4db3d51c42531bf3f333bf82a3928358bf Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Orsava <torsava@redhat.com>
|
||||
Date: Wed, 9 Aug 2017 14:46:01 +0200
|
||||
Subject: [PATCH] Run test on a version specific pip
|
||||
|
||||
pip3 for Python 3, pip2 for Python 2, because the other might not be installed
|
||||
---
|
||||
setuptools/tests/test_develop.py | 2 +-
|
||||
setuptools/tests/test_namespaces.py | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
|
||||
index ad7cfa0..c1b6e22 100644
|
||||
--- a/setuptools/tests/test_develop.py
|
||||
+++ b/setuptools/tests/test_develop.py
|
||||
@@ -167,7 +167,7 @@ class TestNamespaces:
|
||||
target = tmpdir / 'packages'
|
||||
# use pip to install to the target directory
|
||||
install_cmd = [
|
||||
- 'pip',
|
||||
+ 'pip%s' % sys.version_info.major,
|
||||
'install',
|
||||
str(pkg_A),
|
||||
'-t', str(target),
|
||||
diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py
|
||||
index 721cad1..a71fd69 100644
|
||||
--- a/setuptools/tests/test_namespaces.py
|
||||
+++ b/setuptools/tests/test_namespaces.py
|
||||
@@ -30,7 +30,7 @@ class TestNamespaces:
|
||||
targets = site_packages, path_packages
|
||||
# use pip to install to the target directory
|
||||
install_cmd = [
|
||||
- 'pip',
|
||||
+ 'pip%s' % sys.version_info.major,
|
||||
'install',
|
||||
str(pkg_A),
|
||||
'-t', str(site_packages),
|
||||
@@ -38,7 +38,7 @@ class TestNamespaces:
|
||||
subprocess.check_call(install_cmd)
|
||||
namespaces.make_site_dir(site_packages)
|
||||
install_cmd = [
|
||||
- 'pip',
|
||||
+ 'pip%s' % sys.version_info.major,
|
||||
'install',
|
||||
str(pkg_B),
|
||||
'-t', str(path_packages),
|
||||
@@ -88,7 +88,7 @@ class TestNamespaces:
|
||||
target = tmpdir / 'packages'
|
||||
# use pip to install to the target directory
|
||||
install_cmd = [
|
||||
- 'pip',
|
||||
+ 'pip%s' % sys.version_info.major,
|
||||
'install',
|
||||
str(pkg_A),
|
||||
'-t', str(target),
|
||||
--
|
||||
2.13.3
|
||||
|
@ -38,6 +38,10 @@ License: MIT
|
||||
URL: https://pypi.python.org/pypi/%{srcname}
|
||||
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
|
||||
|
||||
# Some tests require an active internet connection, which is not possible
|
||||
# within koji, so we mark them as expected failures.
|
||||
Patch0: skip-internet-requiring-tests.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%if %{with python2}
|
||||
@ -142,6 +146,7 @@ rm -f setuptools/*.exe
|
||||
# These tests require internet connection
|
||||
rm setuptools/tests/test_integration.py
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
|
23
skip-internet-requiring-tests.patch
Normal file
23
skip-internet-requiring-tests.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
|
||||
index 66ca916..75472d2 100644
|
||||
--- a/setuptools/tests/test_egg_info.py
|
||||
+++ b/setuptools/tests/test_egg_info.py
|
||||
@@ -233,8 +233,10 @@ class TestEggInfo(object):
|
||||
'''
|
||||
install_requires_deterministic
|
||||
|
||||
+ @xfail
|
||||
install_requires=["fake-factory==0.5.2", "pytz"]
|
||||
|
||||
+ @xfail
|
||||
[options]
|
||||
install_requires =
|
||||
fake-factory==0.5.2
|
||||
@@ -393,6 +395,7 @@ class TestEggInfo(object):
|
||||
assert install_requires.lstrip() == expected_requires
|
||||
assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == []
|
||||
|
||||
+ @pytest.mark.xfail(reason="Test requires an internet connection")
|
||||
def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env):
|
||||
"""
|
||||
Packages that pass unordered install_requires sequences
|
Loading…
Reference in New Issue
Block a user