commit
965dd3cfb5
21
setup.py
21
setup.py
|
@ -81,7 +81,7 @@ setup(
|
||||||
"tornado>=4.3,<5.2",
|
"tornado>=4.3,<5.2",
|
||||||
"urwid>=2.0.1,<2.1",
|
"urwid>=2.0.1,<2.1",
|
||||||
"wsproto>=0.14.0,<0.15.0",
|
"wsproto>=0.14.0,<0.15.0",
|
||||||
"publicsuffix2~=2.20",
|
"publicsuffix2>=2.20190812,<3",
|
||||||
"zstandard>=0.11.0,<0.13.0",
|
"zstandard>=0.11.0,<0.13.0",
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
|
@ -90,22 +90,21 @@ setup(
|
||||||
],
|
],
|
||||||
'dev': [
|
'dev': [
|
||||||
"asynctest>=0.12.0",
|
"asynctest>=0.12.0",
|
||||||
"flake8>=3.5,<=3.7.8",
|
"flake8>=3.7.8,<3.8",
|
||||||
"Flask>=1.0,<1.2",
|
"Flask>=1.0,<1.2",
|
||||||
"mypy>=0.590,<0.591",
|
"mypy>=0.590,<0.591",
|
||||||
"parver>=0.1,<2.0",
|
"parver>=0.1,<2.0",
|
||||||
"pytest-asyncio>=0.8",
|
"pytest-asyncio>=0.10.0,<0.11",
|
||||||
"pytest-cov>=2.5.1,<3",
|
"pytest-cov>=2.7.1,<3",
|
||||||
"pytest-faulthandler>=1.3.1,<2",
|
"pytest-timeout>=1.3.3,<2",
|
||||||
"pytest-timeout>=1.2.1,<2",
|
"pytest-xdist>=1.29,<2",
|
||||||
"pytest-xdist>=1.22,<2",
|
"pytest>=5.1.3,<6",
|
||||||
"pytest>=4.0,<5",
|
"requests>=2.9.1,<3",
|
||||||
"requests>=2.9.1, <3",
|
|
||||||
"tox>=3.5,<3.15",
|
"tox>=3.5,<3.15",
|
||||||
"rstcheck>=2.2, <4.0",
|
"rstcheck>=2.2,<4.0",
|
||||||
],
|
],
|
||||||
'examples': [
|
'examples': [
|
||||||
"beautifulsoup4>=4.4.1, <4.7"
|
"beautifulsoup4>=4.4.1,<4.7"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -31,8 +31,8 @@ def pytest_configure(config):
|
||||||
global no_full_cov
|
global no_full_cov
|
||||||
|
|
||||||
enable_coverage = (
|
enable_coverage = (
|
||||||
len(config.getoption('file_or_dir')) == 0 and
|
config.getoption('file_or_dir') and len(config.getoption('file_or_dir')) == 0 and
|
||||||
len(config.getoption('full_cov')) > 0 and
|
config.getoption('full_cov') and len(config.getoption('full_cov')) > 0 and
|
||||||
config.pluginmanager.getplugin("_cov") is not None and
|
config.pluginmanager.getplugin("_cov") is not None and
|
||||||
config.pluginmanager.getplugin("_cov").cov_controller is not None and
|
config.pluginmanager.getplugin("_cov").cov_controller is not None and
|
||||||
config.pluginmanager.getplugin("_cov").cov_controller.cov is not None
|
config.pluginmanager.getplugin("_cov").cov_controller.cov is not None
|
||||||
|
|
|
@ -19,29 +19,29 @@ def run_tests(src, test, fail):
|
||||||
e = pytest.main([
|
e = pytest.main([
|
||||||
'-qq',
|
'-qq',
|
||||||
'--disable-pytest-warnings',
|
'--disable-pytest-warnings',
|
||||||
'--no-faulthandler',
|
|
||||||
'--cov', src.replace('.py', '').replace('/', '.'),
|
'--cov', src.replace('.py', '').replace('/', '.'),
|
||||||
'--cov-fail-under', '100',
|
'--cov-fail-under', '100',
|
||||||
'--cov-report', 'term-missing:skip-covered',
|
'--cov-report', 'term-missing:skip-covered',
|
||||||
|
'-o', 'faulthandler_timeout=0',
|
||||||
test
|
test
|
||||||
])
|
])
|
||||||
|
|
||||||
if e == 0:
|
if e == 0:
|
||||||
if fail:
|
if fail:
|
||||||
print("UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.")
|
print("FAIL DUE TO UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.")
|
||||||
e = 42
|
e = 42
|
||||||
else:
|
else:
|
||||||
print("SUCCESS: ", src)
|
print("Success:", src)
|
||||||
else:
|
else:
|
||||||
if fail:
|
if fail:
|
||||||
print("IGNORING FAIL: ", src)
|
print("Ignoring allowed fail:", src)
|
||||||
e = 0
|
e = 0
|
||||||
else:
|
else:
|
||||||
cov = [l for l in stdout.getvalue().split("\n") if (src in l) or ("was never imported" in l)]
|
cov = [l for l in stdout.getvalue().split("\n") if (src in l) or ("was never imported" in l)]
|
||||||
if len(cov) == 1:
|
if len(cov) == 1:
|
||||||
print("FAIL: ", cov[0])
|
print("FAIL:", cov[0])
|
||||||
else:
|
else:
|
||||||
print("FAIL: ", src, test, stdout.getvalue(), stdout.getvalue())
|
print("FAIL:", src, test, stdout.getvalue(), stdout.getvalue())
|
||||||
print(stderr.getvalue())
|
print(stderr.getvalue())
|
||||||
print(stdout.getvalue())
|
print(stdout.getvalue())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue