From 70bb4d58ff3f42b05cb1ab185336b99585eb8d28 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Jan 03 2018 13:08:00 +0000 Subject: Mark tests that require an active internet connection as expected failures. Remove obsolete patch. --- diff --git a/0001-Run-test-on-a-version-specific-pip.patch b/0001-Run-test-on-a-version-specific-pip.patch deleted file mode 100644 index f762f76..0000000 --- a/0001-Run-test-on-a-version-specific-pip.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 62effe4db3d51c42531bf3f333bf82a3928358bf Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -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 - diff --git a/python-setuptools.spec b/python-setuptools.spec index 335a343..8f85f3b 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -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} diff --git a/skip-internet-requiring-tests.patch b/skip-internet-requiring-tests.patch new file mode 100644 index 0000000..e8141bf --- /dev/null +++ b/skip-internet-requiring-tests.patch @@ -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