John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/206076
Change subject: Isolate 'en.wp' travis build to test prod sites ...................................................................... Isolate 'en.wp' travis build to test prod sites Change-Id: I5604a389016c155ed31fad6a138061a81732426e --- M .travis.yml M tests/aspects.py 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/206076/1 diff --git a/.travis.yml b/.travis.yml index fa77aae..59ab1fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,7 +79,7 @@ # See http://docs.travis-ci.com/user/encryption-keys/ for more information. - secure: kofInMlisiTBt9o/Ustc/vySlkKfxGzGCX2LwA1D2waym8sDTS0o5gMJ5LsrT/BUKwZbe1vLozPHqZrrkQvsdTml+DpZuotzdILs0m0f3BUoexEC6OON5IDljuxFyETrD1Ug44ih5Mc4lVFOdTcBzg501ZmswGwQrBvg/OyEFfE= matrix: - - LANGUAGE=en FAMILY=wikipedia EXTERNALS_HTTPLIB2=1 + - LANGUAGE=en FAMILY=wikipedia EXTERNALS_HTTPLIB2=1 PYWIKIBOT2_TEST_PROD_ONLY=1 - LANGUAGE=fr FAMILY=wikipedia PYSETUP_TEST_EXTRAS=1 - LANGUAGE=test FAMILY=wikidata SITE_ONLY=1 - LANGUAGE=ar FAMILY=wiktionary SITE_ONLY=1 EXTERNALS_HTTPLIB2=1 diff --git a/tests/aspects.py b/tests/aspects.py index 2458b6b..1cb6b05 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -804,6 +804,7 @@ Prefetch the Site object for each of the sites the test class has declared are needed. """ + from tests.utils import DrySite # noqa super(TestCase, cls).setUpClass() if not hasattr(cls, 'sites'): @@ -821,10 +822,16 @@ interface = None # defaults to 'APISite' if hasattr(cls, 'dry') and cls.dry: # Delay load to avoid cyclic import - from tests.utils import DrySite interface = DrySite for data in cls.sites.values(): + if ('code' in data and data['code'] in ('test', 'mediawiki') and + 'PYWIKIBOT2_TEST_PROD_ONLY' in os.environ and + interface != DrySite): + raise unittest.SkipTest( + 'Site code "%s" and PYWIKIBOT2_TEST_PROD_ONLY is set.' + % data['code']) + if 'site' not in data and 'code' in data and 'family' in data: data['site'] = Site(data['code'], data['family'], interface=interface) -- To view, visit https://gerrit.wikimedia.org/r/206076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5604a389016c155ed31fad6a138061a81732426e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits