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:
Ryan Farley 2017-12-01 10:51:41 -06:00
parent 49485ca220
commit df6ff55b7a
2 changed files with 6 additions and 1 deletions

View File

@ -205,6 +205,10 @@ def main():
args = parser.parse_args()
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)
else:
executable = sys.executable

View File

@ -13,6 +13,7 @@ skipsdist = true
setenv =
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
PYTEST_QT_API=pyqt5
pyqt{,56,571,58,59}: LINK_PYQT_SKIP=true
pyqt{,56,571,58,59}: QUTE_BDD_WEBENGINE=true
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* DOCKER
@ -27,7 +28,7 @@ deps =
pyqt58: PyQt5==5.8.2
pyqt59: PyQt5==5.9.2
commands =
pyqtlink: {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -bb -m pytest {posargs:tests}
cov: {envpython} scripts/dev/check_coverage.py {posargs}