From ac7287677bfbdaf447bc387780f992c0b61e9b9b Mon Sep 17 00:00:00 2001 From: tpltnt Date: Sun, 31 Dec 2017 14:50:21 +0100 Subject: [PATCH 1/3] importing twisted trial instead of allmydata trial --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2e3bf7988..5af689f92 100644 --- a/tox.ini +++ b/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] From c7cf7c3956bfb6bcf7a4590e941d8888f2587e72 Mon Sep 17 00:00:00 2001 From: tpltnt Date: Sun, 31 Dec 2017 14:59:14 +0100 Subject: [PATCH 2/3] make twisted >= 16.4.0 a requirement --- src/allmydata/_auto_deps.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/allmydata/_auto_deps.py b/src/allmydata/_auto_deps.py index 20740acb8..4f9b04828 100644 --- a/src/allmydata/_auto_deps.py +++ b/src/allmydata/_auto_deps.py @@ -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", From c5e8d83b73dba3c32b5c5e60aaa49f34ec1f23eb Mon Sep 17 00:00:00 2001 From: tpltnt Date: Sun, 31 Dec 2017 15:02:10 +0100 Subject: [PATCH 3/3] removed old test/trial helper module --- src/allmydata/test/run_trial.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/allmydata/test/run_trial.py diff --git a/src/allmydata/test/run_trial.py b/src/allmydata/test/run_trial.py deleted file mode 100644 index 66c45ea63..000000000 --- a/src/allmydata/test/run_trial.py +++ /dev/null @@ -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()