jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[test] Allow user tests on AppVeyor

- add missing username and password to AppVeyor's user-config.py

+ add two newly introduced sites to AppVeyor and Travis configuration

Bug: T245012
Change-Id: Ica688c074f1265dd4d311849305591e22ecb6d9b
---
M .appveyor.yml
M .travis.yml
2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/.appveyor.yml b/.appveyor.yml
index 1db1b91..d11de35 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,6 +12,7 @@

PYWIKIBOT_DIR: "%appdata%\\Pywikibot"
PYWIKIBOT_USER_CONFIG: "%appdata%\\Pywikibot\\user-config.py"
+ PYWIKIBOT_PASSWD_FILE: "%appdata%\\Pywikibot\\passwordfile"

PYSETUP_TEST_EXTRAS: "1"
PYSETUP_TEST_NO_UI: "1"
@@ -107,11 +108,15 @@
- set PYTHONWARNINGS=ignore:::pkg_resources.py2_warn

- "mkdir %PYWIKIBOT_DIR%"
- - "python -Werror::UserWarning -m generate_user_files -dir:%PYWIKIBOT_DIR% -family:wikipedia -lang:en -v -debug"
+ - "python -Werror::UserWarning -m generate_user_files -dir:%PYWIKIBOT_DIR% -family:wikipedia -lang:en -v -debug -user:%PYWIKIBOT_USERNAME%"
- ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'max_retries = 2; maximum_GET_length = 5000; transliteration_target = None;')"
- - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikipedia''][''test''] = ''$env:PYWIKIBOT_USERNAME'';')"
- - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikidata''][''test''] = ''$env:PYWIKIBOT_USERNAME'';')"
- - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''commons''][''commons''] = ''$env:PYWIKIBOT_USERNAME'';')"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikipedia''][''test''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikidata''][''test''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''commons''][''commons''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''meta''][''meta''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'usernames[''wikisource''][''zh''] = ''{0}'';' -f $env:PYWIKIBOT_USERNAME)"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_PASSWD_FILE, ('(''{0}'', ''{1}'')\n' -f $env:PYWIKIBOT_USERNAME, $env:USER_PASSWORD))"
+ - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT_USER_CONFIG, 'password_file = ''{0}'';' -f $env:PYWIKIBOT_PASSWD_FILE.replace('\\', '\\\\'))"

- "%CMD_IN_ENV% coverage run -m unittest discover -vv -p \"*_tests.py\""

diff --git a/.travis.yml b/.travis.yml
index 4605961..fa6e8d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,6 +72,8 @@
printf "usernames['wikipedia']['test'] = '%q'\n" "$PYWIKIBOT_USERNAME" >> ~/.pywikibot/user-config.py ;
printf "usernames['wikidata']['test'] = '%q'\n" "$PYWIKIBOT_USERNAME" >> ~/.pywikibot/user-config.py ;
printf "usernames['commons']['commons'] = '%q'\n" "$PYWIKIBOT_USERNAME" >> ~/.pywikibot/user-config.py ;
+ printf "usernames['meta']['meta'] = '%q'\n" "$PYWIKIBOT_USERNAME" >> ~/.pywikibot/user-config.py ;
+ printf "usernames['wikisource']['zh'] = '%q'\n" "$PYWIKIBOT_USERNAME" >> ~/.pywikibot/user-config.py ;
printf "('%q', '%q')\n" "$PYWIKIBOT_USERNAME" "$USER_PASSWORD" > ~/.pywikibot/passwordfile ;
echo "import os" >> ~/.pywikibot/user-config.py ;
echo "password_file = os.path.expanduser('~/.pywikibot/passwordfile')" >> ~/.pywikibot/user-config.py ;

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

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