jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] Use wikipedia family for testwiki

Change-Id: I336e5a2253b2cc72fb11b3dd6052f8e832a5ad93
---
M pywikibot/pagegenerators.py
M tests/replacebot_tests.py
M tox.ini
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index d524fe0..25db7bb 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -3062,7 +3062,8 @@
}

# test wikipedia
- if self.site.code == 'test' and self.site.family == 'test':
+ if (self.site.code == 'test'
+ and self.site.family in ['test', 'wikipedia']):
query['language'] = 'test'
query['project'] = 'wikipedia'

diff --git a/tests/replacebot_tests.py b/tests/replacebot_tests.py
index c533495..e1a461b 100644
--- a/tests/replacebot_tests.py
+++ b/tests/replacebot_tests.py
@@ -90,7 +90,7 @@
"""Run the L{replace.main} with the given args and summary and page."""
# -page to not have an empty generator
# -lang and -family as it will use Site() otherwise
- return replace.main(*(args + ('-lang:test', '-family:test',
+ return replace.main(*(args + ('-lang:test', '-family:wikipedia',
'-page:TEST')))

def test_invalid_replacements(self):
diff --git a/tox.ini b/tox.ini
index 15f9ca7..8a31790 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,7 @@
flake8: flake8 --doctests {posargs}
test: python setup.py test

- fasttest: python -W error::UserWarning -m generate_user_files -family:test -lang:test -v
+ fasttest: python -W error::UserWarning -m generate_user_files -family:wikipedia -lang:test -v
fasttest: nosetests --version
fasttest: nosetests --with-detecthttp -v -a '!net' tests
deps =
@@ -53,7 +53,7 @@

[testenv:doctest]
commands =
- python -W error::UserWarning -m generate_user_files -family:test -lang:test -v
+ python -W error::UserWarning -m generate_user_files -family:wikipedia -lang:test -v
nosetests --version
nosetests --with-doctest pywikibot {[params]doctest_skip}
basepython =

To view, visit change 569096. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I336e5a2253b2cc72fb11b3dd6052f8e832a5ad93
Gerrit-Change-Number: 569096
Gerrit-PatchSet: 4
Gerrit-Owner: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)