run black

This commit is contained in:
Ronny Pfannschmidt
2018-05-23 16:48:46 +02:00
parent 3e1590bcfc
commit 703e4b11ba
133 changed files with 13821 additions and 9370 deletions

View File

@@ -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)