jenkins-bot has submitted this change and it was merged.
Change subject: Prevent network activity during Jenkins nose tests ......................................................................
Prevent network activity during Jenkins nose tests
Jenkins nose tests should not use http, and the test framework attempts to ensure network activity is declared so that tests needing network activity can be skipped.
However it is possible to bypass the test framework by declaring a test class does not use the network.
Adding nose plugin detecthttp detects and prevents network activity.
api.py doctests initiated network activity.
Also use '!net' instead of "!net", so the command can be run on the bash command line without '!' being interpreted by bash.
Bug: T115322 Change-Id: I863c1427a233e74445524ae88fd1df5bd5dc4099 --- M tox.ini 1 file changed, 5 insertions(+), 3 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tox.ini b/tox.ini index 529dd3d..b8328bc 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = flake8,flake8-py3,flake8-docstrings-mandatory
[params] -nose_skip = --ignore-files=(gui.py|botirc.py|rcstream.py) +nose_skip = --ignore-files=(gui.py|botirc.py|rcstream.py|api.py) flake8_ignore = D102,D103,{[flake8]ignore}
[testenv] @@ -217,9 +217,10 @@ commands = python -W error::UserWarning -m generate_user_files -family:test -lang:test -v nosetests --version - nosetests --with-doctest -v -a "!net" tests pywikibot {[params]nose_skip} + nosetests --with-doctest --with-detecthttp -v -a '!net' tests pywikibot {[params]nose_skip} deps = nose + nose-detecthttp unicodecsv
[testenv:nose34] @@ -227,9 +228,10 @@ commands = python -W error::UserWarning -m generate_user_files -family:test -lang:test -v nosetests --version - nosetests --with-doctest -v -a "!net" tests pywikibot {[params]nose_skip} + nosetests --with-doctest --with-detecthttp -v -a '!net' tests pywikibot {[params]nose_skip} deps = nose + nose-detecthttp>=0.1.3 # Python 3 support added six
[testenv:venv]
pywikibot-commits@lists.wikimedia.org