jenkins-bot submitted this change.

View Change

Approvals: Legoktm: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Add tox.ini to use Jenkins for i18n-tests

Bug: T286207
Change-Id: I65ad6c5d7691ba59c3283d02baae5c6ae21402ce
---
A run-tests.sh
A tox.ini
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/run-tests.sh b/run-tests.sh
new file mode 100755
index 0000000..2941b01
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -euxo pipefail
+
+git clone https://github.com/wikimedia/pywikibot $1/pywikibot-build --depth 1
+mkdir -p $1/pywikibot-build/scripts/i18n
+touch $1/pywikibot-build/scripts/i18n/__init__.py
+for item in *; do
+ if [[ -d "$item" ]]; then
+ cp -rp "$item" $1/pywikibot-build/scripts/i18n;
+ fi;
+done
+
+cd $1/pywikibot-build
+python -m unittest -v tests/l10n_tests.py
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..054bd24
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,22 @@
+[tox]
+# minversion = 1.7.2 needed for skip_missing_interpreters
+minversion = 1.7.2
+
+# Do not run install command
+skipsdist = True
+skip_missing_interpreters = True
+
+# Environments to execute when invoking 'tox'
+envlist = py37
+
+[testenv]
+setenv =
+ VIRTUAL_ENV={envdir}
+ PYWIKIBOT_NO_USER_CONFIG=2
+
+commands = ./run-tests.sh {envtmpdir}
+
+deps =
+ requests
+ wikitextparser
+allowlist_externals = *

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

Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Change-Id: I65ad6c5d7691ba59c3283d02baae5c6ae21402ce
Gerrit-Change-Number: 703218
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Legoktm <legoktm@debian.org>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged