jayvdb added a comment.
Grr. Sorry you're right.
So, to test, remove either the 'test' or 'wikidata' entry in self.langs of the official pywikibot/families/wikidata_family.py , so only the one you are testing is in the dict
i.e. to test the production wikidata, use:
self.langs = { 'wikidata': 'www.wikidata.org', # 'test': 'test.wikidata.org', }
Then you can use family = 'wikidata' ; mylang = 'en'
Or to run test on the test wikidata site, use:
self.langs = { # 'wikidata': 'www.wikidata.org', 'test': 'test.wikidata.org', }
And then you can use family = 'wikidata' ; mylang = 'en'
As there are lots of unit tests that depend on both test and production wikidata, to test your new date pagegen tests without lots of errors from other tests, use the following syntax to invoke only your test methods:
$ python -m unittest tests.pagegeerators_tests.YourTestClass.test_your_test_method
(see tests/README.rst for more info)
TASK DETAIL https://phabricator.wikimedia.org/T85645
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: pywikipedia-bugs, Aklapper, Unicornisaurous, jayvdb, XZise
pywikipedia-bugs@lists.wikimedia.org