mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 19:34:18 +00:00
Merge pull request #454 from tpltnt/ticket-2811
coverage: replace run_trial with "python -m twisted.trial"
This commit is contained in:
commit
139d63df64
@ -73,7 +73,9 @@ install_requires = [
|
||||
# * Twisted-16.1.0 fixes https://twistedmatrix.com/trac/ticket/8223,
|
||||
# which otherwise causes test_system to fail (DirtyReactorError, due to
|
||||
# leftover timers)
|
||||
"Twisted[tls] >= 16.1.0",
|
||||
# * Twisted-16.4.0 instroduces twisted.trial which is needed for coverage
|
||||
# testing
|
||||
"Twisted[tls] >= 16.4.0",
|
||||
|
||||
# We need Nevow >= 0.11.1 which can be installed using pip.
|
||||
"Nevow >= 0.11.1",
|
||||
|
@ -1,16 +0,0 @@
|
||||
|
||||
# This is a tiny helper module, to let "python -m allmydata.test.run_trial
|
||||
# ARGS" does the same thing as running "trial ARGS" (unfortunately
|
||||
# twisted/scripts/trial.py does not have a '__name__=="__main__"' clause).
|
||||
#
|
||||
# This makes it easier to run trial under coverage from tox:
|
||||
# * "coverage run trial ARGS" is how you'd usually do it
|
||||
# * but "trial" must be the one in tox's virtualenv
|
||||
# * "coverage run `which trial` ARGS" works from a shell
|
||||
# * but tox doesn't use a shell
|
||||
# So use:
|
||||
# "coverage run -m allmydata.test.run_trial ARGS"
|
||||
|
||||
if __name__ == "__main__":
|
||||
from twisted.scripts.trial import run
|
||||
run()
|
2
tox.ini
2
tox.ini
@ -30,7 +30,7 @@ deps = --editable=.[test]
|
||||
commands =
|
||||
pyflakes src static misc setup.py
|
||||
tahoe --version
|
||||
coverage run --branch -m allmydata.test.run_trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors --reporter=timing} {posargs:allmydata}
|
||||
coverage run --branch -m twisted.trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors --reporter=timing} {posargs:allmydata}
|
||||
coverage xml
|
||||
|
||||
[testenv:codechecks]
|
||||
|
Loading…
x
Reference in New Issue
Block a user