Commit 06f8e146 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! Run tests at all levels

@d-maurer notes that --all on the command line prevents using `-a X` on
the tox command line, e.g. as in `tox -- -a 1` because `--all` takes
precedence over `-a`:

https://github.com/zopefoundation/ZEO/pull/210#pullrequestreview-1094352596

Work this around via `-a 1000` used inside tox -> then, any `-a X`
passed to tox on command line will take precedence over the default
`-a 1000`.

Note: Dieter suggested to use `-a 0` as the default, probably because
zope-testrunner documents that "level 0 runs all tests". But
unfortunately it is not true because `-a 0` disables tests on any level
>= 0:

https://github.com/zopefoundation/zope.testrunner/blob/eab00d6f/src/zope/testrunner/find.py#L471-L473

(z-dev) kirr@deca:~/src/wendelin/z/ZEO5$ zope-testrunner -uvvx -a 0 --test-path=src
Running tests at level 0
Total: 0 tests, 0 failures, 0 errors and 0 skipped in 0.000 seconds.

(z-dev) kirr@deca:~/src/wendelin/z/ZEO5$ zope-testrunner -uvvx -a 1 --test-path=src
Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
 testClientBasics (ZEO.asyncio.tests.ClientTests)
 test_ClientDisconnected_on_call_timeout (ZEO.asyncio.tests.ClientTests)
 test_bad_protocol (ZEO.asyncio.tests.ClientTests)
 test_bad_server_tid (ZEO.asyncio.tests.ClientTests)
...
parent af764e6c
......@@ -16,9 +16,9 @@ with-sphinx-doctests = false
use-flake8 = true
testenv-commands = [
"# Run unit tests first.",
"zope-testrunner -u --test-path=src --all {posargs:-vc}",
"zope-testrunner -u --test-path=src -a 1000 {posargs:-vc}",
"# Only run functional tests if unit tests pass.",
"zope-testrunner -f --test-path=src --all {posargs:-vc}",
"zope-testrunner -f --test-path=src -a 1000 {posargs:-vc}",
]
testenv-deps = [
"!zodbmaster: ZODB >= 4.2.0b1",
......
......@@ -28,9 +28,9 @@ setenv =
zeo4: ZEO4_SERVER=1
commands =
# Run unit tests first.
zope-testrunner -u --test-path=src --all {posargs:-vc}
zope-testrunner -u --test-path=src -a 1000 {posargs:-vc}
# Only run functional tests if unit tests pass.
zope-testrunner -f --test-path=src --all {posargs:-vc}
zope-testrunner -f --test-path=src -a 1000 {posargs:-vc}
extras =
test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment