John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/236742

Change subject: nosetests support for PYWIKIBOT_TEST_MODULES
......................................................................

nosetests support for PYWIKIBOT_TEST_MODULES

Change-Id: I65b1dbf4f21ab2a10cc82e19d4bd5ccc668f4134
---
M .travis.yml
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/42/236742/1

diff --git a/.travis.yml b/.travis.yml
index e18b15a..065e5d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,6 +42,8 @@
   - pip install -r dev-requirements.txt
 
 script:
+  - PYWIKIBOT_TEST_MODULES=(${PYWIKIBOT_TEST_MODULES//,/ })
+
   # Install security packages for requests to support HTTPS in site_detect
   - if [[ "$PYSETUP_TEST_EXTRAS" != '1' ]]; then
       pip install mwoauth -r requests-requirements.txt ;
@@ -88,12 +90,14 @@
   - python -c "import setuptools; print(setuptools.__version__)"
 
   - if [[ "$USE_NOSE" == "1" ]]; then
+      TEST_SUITE="$(for i in ${!PYWIKIBOT_TEST_MODULES[@]}; do echo -n " 
--tests tests.${PYWIKIBOT_TEST_MODULES[i]}_tests"; done)" ;
+      if [[ "$TEST_SUITE" == "" ]]; then TEST_SUITE="--tests tests"; fi ;
       nosetests --version ;
       if [[ "$SITE_ONLY" == "1" ]]; then
         echo "Running site tests only code ${LANGUAGE} on family ${FAMILY}" ;
-        python setup.py nosetests --tests tests --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" ;
+        python setup.py nosetests $TEST_SUITE --verbosity=2 -a 
"family=$FAMILY,code=$LANGUAGE" ;
       else
-        python setup.py nosetests --tests tests --verbosity=2 ;
+        python setup.py nosetests $TEST_SUITE --verbosity=2 ;
       fi ;
     else
       python setup.py test ;

-- 
To view, visit https://gerrit.wikimedia.org/r/236742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65b1dbf4f21ab2a10cc82e19d4bd5ccc668f4134
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to