Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1180503?usp=email )
Change subject: tests: Run doctest with Python 3.8 and 3.13
......................................................................
tests: Run doctest with Python 3.8 and 3.13
Bug: T348905
Change-Id: Ida2164f366067d2f28c0647dc78562d18986c0c0
---
M tox.ini
1 file changed, 26 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tox.ini b/tox.ini
index 0e67136..2f4fa61 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,6 +11,8 @@
# Note: tox 4 does not support multiple lines when doing parameters
# substitution.
generate_user_files = -W error::UserWarning -m pwb generate_user_files
-family:wikipedia -lang:test -v
+# ignores: gui.py (needs tkinter), memento.py (has too many timeouts)
+DOCTEST_IGNORES = --ignore-glob=*gui.py --ignore-glob=*memento.py
[testenv]
basepython =
@@ -74,13 +76,33 @@
commands = commit-message-validator
[testenv:doctest]
+basepython = python3
+skip_install = True
+allowlist_externals = tox
+deps =
+commands =
+ tox -e doctest-py38
+ tox -e doctest-py313
+
+[testenv:doctest-py38]
basepython = python3.8
commands =
+ python -m pytest --version
python {[params]generate_user_files}
- pytest --version
-# gui.py needs tkinter
-# memento.py has too many timeout
- pytest pywikibot --doctest-modules --ignore-glob="*gui.py"
--ignore-glob="*memento.py"
+ python -m pytest pywikibot --doctest-modules {[params]DOCTEST_IGNORES}
+
+deps =
+ pytest >= 7.0.1
+ wikitextparser
+ .[eventstreams]
+ .[mysql]
+
+[testenv:doctest-py313]
+basepython = python3.13
+commands =
+ python -m pytest --version
+ # user files already exists from doctest-py38 run
+ python -m pytest pywikibot --doctest-modules {[params]DOCTEST_IGNORES}
deps =
pytest >= 7.0.1
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1180503?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ida2164f366067d2f28c0647dc78562d18986c0c0
Gerrit-Change-Number: 1180503
Gerrit-PatchSet: 12
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]