Merge branch 'update-dependencies'
This commit is contained in:
commit
d094e4e18a
|
|
@ -4,7 +4,7 @@ attrs==19.3.0
|
|||
beautifulsoup4==4.9.1
|
||||
certifi==2020.6.20
|
||||
chardet==3.0.4
|
||||
cheroot==8.4.1
|
||||
cheroot==8.4.2
|
||||
click==7.1.2
|
||||
# colorama==0.4.3
|
||||
coverage==5.2.1
|
||||
|
|
@ -12,8 +12,9 @@ EasyProcess==0.3
|
|||
Flask==1.1.2
|
||||
glob2==0.7
|
||||
hunter==3.1.3
|
||||
hypothesis==5.23.2
|
||||
hypothesis==5.23.3
|
||||
idna==2.10
|
||||
iniconfig==1.0.0
|
||||
itsdangerous==1.1.0
|
||||
jaraco.functools==3.0.1 ; python_version>="3.6"
|
||||
# Jinja2==2.11.2
|
||||
|
|
@ -29,7 +30,7 @@ py==1.9.0
|
|||
py-cpuinfo==7.0.0
|
||||
Pygments==2.6.1
|
||||
pyparsing==2.4.7
|
||||
pytest==5.4.3
|
||||
pytest==6.0.0
|
||||
pytest-bdd==3.4.0
|
||||
pytest-benchmark==3.2.3
|
||||
pytest-cov==2.10.0
|
||||
|
|
@ -46,8 +47,8 @@ six==1.15.0
|
|||
sortedcontainers==2.2.2
|
||||
soupsieve==2.0.1
|
||||
tldextract==2.2.2
|
||||
toml==0.10.1
|
||||
urllib3==1.25.10
|
||||
vulture==1.5
|
||||
wcwidth==0.2.5
|
||||
vulture==1.6
|
||||
Werkzeug==1.0.1
|
||||
jaraco.functools==2.0; python_version<"3.6" # rq.filter: <= 2.0
|
||||
|
|
|
|||
|
|
@ -6,13 +6,10 @@ hypothesis
|
|||
pytest
|
||||
pytest-bdd
|
||||
pytest-benchmark
|
||||
pytest-cov
|
||||
pytest-instafail
|
||||
pytest-mock
|
||||
pytest-qt
|
||||
pytest-rerunfailures
|
||||
pytest-xvfb
|
||||
PyVirtualDisplay
|
||||
|
||||
## optional:
|
||||
# To test :debug-trace, gets skipped if hunter is not installed
|
||||
|
|
@ -23,6 +20,11 @@ vulture
|
|||
pygments
|
||||
# --repeat switch (used to manually repeat tests)
|
||||
pytest-repeat
|
||||
# For coverage tests
|
||||
pytest-cov
|
||||
# To avoid windows from popping up
|
||||
pytest-xvfb
|
||||
PyVirtualDisplay
|
||||
|
||||
# Needed to test misc/userscripts/qute-lastpass
|
||||
tldextract
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ py==1.9.0
|
|||
pyparsing==2.4.7
|
||||
six==1.15.0
|
||||
toml==0.10.1
|
||||
tox==3.18.0
|
||||
tox==3.18.1
|
||||
tox-pip-version==0.0.7
|
||||
tox-venv==0.4.0
|
||||
virtualenv==20.0.28
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||
|
||||
vulture==1.5
|
||||
vulture==1.6
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
[pytest]
|
||||
log_level = NOTSET
|
||||
addopts = --strict --instafail --benchmark-columns=Min,Max,Median
|
||||
addopts = --strict-markers --strict-config --instafail --benchmark-columns=Min,Max,Median
|
||||
testpaths = tests
|
||||
required_plugins =
|
||||
pytest-bdd
|
||||
pytest-benchmark
|
||||
pytest-instafail
|
||||
pytest-mock
|
||||
pytest-qt
|
||||
pytest-rerunfailures
|
||||
markers =
|
||||
gui: Tests using the GUI (e.g. spawning widgets)
|
||||
posix: Tests which only can run on a POSIX OS.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ CHANGELOG_URLS = {
|
|||
'hypothesis': 'https://hypothesis.readthedocs.io/en/latest/changes.html',
|
||||
'mypy': 'https://mypy-lang.blogspot.com/',
|
||||
'pytest': 'https://docs.pytest.org/en/latest/changelog.html',
|
||||
'iniconfig': 'https://github.com/RonnyPfannschmidt/iniconfig/blob/master/CHANGELOG',
|
||||
'tox': 'https://tox.readthedocs.io/en/latest/changelog.html',
|
||||
'pyyaml': 'https://github.com/yaml/pyyaml/blob/master/CHANGES',
|
||||
'pytest-bdd': 'https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst',
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ def main():
|
|||
'compare-to-empty-string',
|
||||
# directories without __init__.py...
|
||||
'import-error',
|
||||
# WORKAROUND for https://github.com/pytest-dev/pytest/issues/7558
|
||||
'not-callable',
|
||||
]
|
||||
|
||||
toxinidir = sys.argv[1]
|
||||
|
|
|
|||
|
|
@ -234,11 +234,6 @@ def pytest_configure(config):
|
|||
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def check_display(request):
|
||||
if (not request.config.getoption('--no-xvfb') and
|
||||
'QUTE_BUILDBOT' in os.environ and
|
||||
request.config.xvfb is not None):
|
||||
raise Exception("Xvfb is running on buildbot!")
|
||||
|
||||
if utils.is_linux and not os.environ.get('DISPLAY', ''):
|
||||
raise Exception("No display and no Xvfb available!")
|
||||
|
||||
|
|
|
|||
|
|
@ -683,9 +683,7 @@ class QuteProc(testprocess.Process):
|
|||
if bad_msgs:
|
||||
text = 'Logged unexpected errors:\n\n' + '\n'.join(
|
||||
str(e) for e in bad_msgs)
|
||||
# We'd like to use pytrace=False here but don't as a WORKAROUND
|
||||
# for https://github.com/pytest-dev/pytest/issues/1316
|
||||
pytest.fail(text)
|
||||
pytest.fail(text, pytrace=False)
|
||||
else:
|
||||
self._maybe_skip()
|
||||
finally:
|
||||
|
|
|
|||
|
|
@ -51,10 +51,12 @@ class CovtestHelper:
|
|||
"""Run pytest with coverage for the given module.py."""
|
||||
coveragerc = str(self._testdir.tmpdir / 'coveragerc')
|
||||
self._monkeypatch.delenv('PYTEST_ADDOPTS', raising=False)
|
||||
return self._testdir.runpytest('--cov=module',
|
||||
'--cov-config={}'.format(coveragerc),
|
||||
'--cov-report=xml',
|
||||
plugins=['no:faulthandler'])
|
||||
res = self._testdir.runpytest('--cov=module',
|
||||
'--cov-config={}'.format(coveragerc),
|
||||
'--cov-report=xml',
|
||||
plugins=['no:faulthandler', 'no:xvfb'])
|
||||
assert res.ret == 0
|
||||
return res
|
||||
|
||||
def check(self, perfect_files=None):
|
||||
"""Run check_coverage.py and run its return value."""
|
||||
|
|
@ -92,6 +94,15 @@ def covtest(testdir, monkeypatch):
|
|||
def test_module():
|
||||
func()
|
||||
""")
|
||||
|
||||
# Check if coverage plugin is available
|
||||
res = testdir.runpytest('--version', '--version')
|
||||
assert res.ret == 0
|
||||
output = res.stderr.str()
|
||||
assert 'This is pytest version' in output
|
||||
if 'pytest-cov' not in output:
|
||||
pytest.skip("cov plugin not available")
|
||||
|
||||
return CovtestHelper(testdir, monkeypatch)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue