allow pytest to default to link_pyqt
link_pyqt now checks for LINK_PYQT_SKIP, allowing pytest env names like `py36` to work properly without negative conditionals in tox.ini
This commit is contained in:
parent
49485ca220
commit
df6ff55b7a
@ -205,6 +205,10 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.tox:
|
if args.tox:
|
||||||
|
#workaround for the lack of negative factors in tox.ini
|
||||||
|
if 'LINK_PYQT_SKIP' in os.environ:
|
||||||
|
print('LINK_PYQT_SKIP set, exiting...')
|
||||||
|
sys.exit(0)
|
||||||
executable = get_tox_syspython(args.path)
|
executable = get_tox_syspython(args.path)
|
||||||
else:
|
else:
|
||||||
executable = sys.executable
|
executable = sys.executable
|
||||||
|
3
tox.ini
3
tox.ini
@ -13,6 +13,7 @@ skipsdist = true
|
|||||||
setenv =
|
setenv =
|
||||||
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
|
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
|
||||||
PYTEST_QT_API=pyqt5
|
PYTEST_QT_API=pyqt5
|
||||||
|
pyqt{,56,571,58,59}: LINK_PYQT_SKIP=true
|
||||||
pyqt{,56,571,58,59}: QUTE_BDD_WEBENGINE=true
|
pyqt{,56,571,58,59}: QUTE_BDD_WEBENGINE=true
|
||||||
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
|
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
|
||||||
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* DOCKER
|
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* DOCKER
|
||||||
@ -27,7 +28,7 @@ deps =
|
|||||||
pyqt58: PyQt5==5.8.2
|
pyqt58: PyQt5==5.8.2
|
||||||
pyqt59: PyQt5==5.9.2
|
pyqt59: PyQt5==5.9.2
|
||||||
commands =
|
commands =
|
||||||
pyqtlink: {envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} -bb -m pytest {posargs:tests}
|
{envpython} -bb -m pytest {posargs:tests}
|
||||||
cov: {envpython} scripts/dev/check_coverage.py {posargs}
|
cov: {envpython} scripts/dev/check_coverage.py {posargs}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user