Fix integration test targeting with pytest -k
Refactor tox.ini to support pytest keyword options in the integration test environments.
Test with:
tox -e py27-requests-integration -- -k jupyter
tox -e integration-tests -- -k jupyter
Fixes
@@ -6,7 +6,7 @@ envlist =
[testenv]
commands =
- py.test -k "not tests/test_integration.py" {posargs:-vvs}
+ py.test --ignore="tests/test_integration.py" {posargs:-vvs}
# Ensure pex's main entrypoint can be run externally.
pex --cache-dir {envtmpdir}/buildcache wheel requests . -e pex.bin.pex:main --version
@@ -34,27 +34,21 @@ whitelist_externals = open
deps =
tox
commands =
- tox -e py27-integration
- tox -e py36-integration
- tox -e pypy-integration
-
-[testenv:pypy-integration]
-deps =
- tox
-commands =
- tox -e pypy-requests -- -k "tests/test_integration.py" {posargs:-vvs}
+ tox -e py27-integration -- {posargs:-vvs}
+ tox -e py36-integration -- {posargs:-vvs}
+ tox -e pypy-integration -- {posargs:-vvs}
[testenv:py27-integration]
-deps =
- tox
commands =
- tox -e py27-requests -- -k "tests/test_integration.py" {posargs:-vvs}
+ py.test tests/test_integration.py {posargs:-vvs}
[testenv:py36-integration]
-deps =
- tox
commands =
- tox -e py36-requests -- -k "tests/test_integration.py" {posargs:-vvs}
+ py.test tests/test_integration.py {posargs:-vvs}
+
+[testenv:pypy-integration]
+commands =
+ py.test tests/test_integration.py {posargs:-vvs}
[integration]
commands =
