summaryrefslogtreecommitdiff
path: root/testing/test_modimport.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2018-05-23 16:48:46 +0200
committerRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2018-05-23 16:48:46 +0200
commit703e4b11ba76171eccd3f13e723c47b810ded7ef (patch)
tree1d573c62db1f5d876360a0793891eb4d6103f635 /testing/test_modimport.py
parent3e1590bcfcce1a28619abc31425f407cb0459b75 (diff)
downloadpytest-703e4b11ba76171eccd3f13e723c47b810ded7ef.tar.gz
run black
Diffstat (limited to 'testing/test_modimport.py')
-rw-r--r--testing/test_modimport.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/testing/test_modimport.py b/testing/test_modimport.py
index 2ab86bf7a..f7b92a0b6 100644
--- a/testing/test_modimport.py
+++ b/testing/test_modimport.py
@@ -5,21 +5,25 @@ import pytest
import _pytest
MODSET = [
- x for x in py.path.local(_pytest.__file__).dirpath().visit('*.py')
- if x.purebasename != '__init__'
+ 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)
+@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
- res = subprocess.call([
- sys.executable,
- '-c', 'import sys, py; py.path.local(sys.argv[1]).pyimport()',
- modfile.strpath,
- ])
+ res = subprocess.call(
+ [
+ sys.executable,
+ "-c",
+ "import sys, py; py.path.local(sys.argv[1]).pyimport()",
+ modfile.strpath,
+ ]
+ )
if res:
pytest.fail("command result %s" % res)