jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1060876?usp=email )
Change subject: [CI] run fasttest with pypy ...................................................................... [CI] run fasttest with pypy use pypy3 as py39 base python because the current pypy3 bases on Python 3.9. This ensures that fasttest-py39 runs with pypy. Fix gui_tests because pypy3 has a tkinter module but this just raises ImportError if _tkinter is not installed; require_modules does not work here for tkinter. Change-Id: I2640dd17f62d5d40b54d8e5cf1279661d094e302 --- M tests/gui_tests.py M tox.ini 2 files changed, 12 insertions(+), 5 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/gui_tests.py b/tests/gui_tests.py index 428ba2e..b1602af 100755 --- a/tests/gui_tests.py +++ b/tests/gui_tests.py @@ -55,7 +55,7 @@ self.assertIn('Main Page', text) -@require_modules('tkinter', 'PIL') +@require_modules('PIL') def setUpModule(): """Skip tests if tkinter or PIL is not installed. @@ -67,7 +67,13 @@ '(set PYWIKIBOT_TEST_GUI=1 to enable)') global EditBoxWindow, Tkdialog, tkinter - import tkinter + + # pypy3 has a tkinter module which just raises importError if _tkinter + # is not installed; thus require_modules does not work for it. + try: + import tkinter + except ImportError as e: + raise unittest.SkipTest(e) from pywikibot.userinterfaces.gui import EditBoxWindow, Tkdialog diff --git a/tox.ini b/tox.ini index db19bcf..a021ec2 100644 --- a/tox.ini +++ b/tox.ini @@ -5,8 +5,8 @@ skip_missing_interpreters = True envlist = commit-message - flake8-py{37,312,py} - hacking-py{37,312,py} + flake8-py3{7,9,12} + hacking-py3{7,9,12} [params] # Note: tox 4 does not support multiple lines when doing parameters @@ -14,10 +14,11 @@ generate_user_files = -W error::UserWarning -m pwb generate_user_files -family:wikipedia -lang:test -v [testenv] +# pypy3 bases on Python 3.9 basepython = py37: python3.7 py38: python3.8 - py39: python3.9 + py39: pypy3 py310: python3.10 py311: python3.11 py312: python3.12 -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1060876?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: I2640dd17f62d5d40b54d8e5cf1279661d094e302 Gerrit-Change-Number: 1060876 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org