summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2020-02-04 08:26:40 +0100
committerGitHub <noreply@github.com>2020-02-04 08:26:40 +0100
commitbc494661ad7fba028a4e394fc5e53dcd8da14efd (patch)
treea3bdf365b94529da4d121335da4951b11e891512 /testing
parent4316fe8a92ce457b897043c32bb49243858e9960 (diff)
parentabffd16ce6e950a27b013f017b0bee167f095bf8 (diff)
downloadpytest-bc494661ad7fba028a4e394fc5e53dcd8da14efd.tar.gz
Remove testing/test_modimport.py (#6666)
Diffstat (limited to 'testing')
-rw-r--r--testing/test_meta.py6
-rw-r--r--testing/test_modimport.py40
2 files changed, 6 insertions, 40 deletions
diff --git a/testing/test_meta.py b/testing/test_meta.py
index 296aa42aa..ffc8fd38a 100644
--- a/testing/test_meta.py
+++ b/testing/test_meta.py
@@ -1,3 +1,9 @@
+"""
+Test importing of all internal packages and modules.
+
+This ensures all internal packages can be imported without needing the pytest
+namespace being set, which is critical for the initialization of xdist.
+"""
import pkgutil
import subprocess
import sys
diff --git a/testing/test_modimport.py b/testing/test_modimport.py
deleted file mode 100644
index 3d7a07323..000000000
--- a/testing/test_modimport.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import subprocess
-import sys
-
-import py
-
-import _pytest
-import pytest
-
-pytestmark = pytest.mark.slow
-
-MODSET = [
- x
- for x in py.path.local(_pytest.__file__).dirpath().visit("*.py")
- if x.purebasename != "__init__"
-]
-
-
-@pytest.mark.parametrize("modfile", MODSET, ids=lambda x: x.purebasename)
-def test_fileimport(modfile):
- # this test ensures all internal packages can import
- # without needing the pytest namespace being set
- # this is critical for the initialization of xdist
-
- p = subprocess.Popen(
- [
- sys.executable,
- "-c",
- "import sys, py; py.path.local(sys.argv[1]).pyimport()",
- modfile.strpath,
- ],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- )
- (out, err) = p.communicate()
- assert p.returncode == 0, "importing %s failed (exitcode %d): out=%r, err=%r" % (
- modfile,
- p.returncode,
- out,
- err,
- )