jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/815898 )

Change subject: [tests] Update ui_tests due to changed behaviour of Python 3.11a
......................................................................

[tests] Update ui_tests due to changed behaviour of Python 3.11a

Change-Id: I2d9ff415aef75d3c2bb05286fc331d35b6edfbee
---
M tests/ui_tests.py
1 file changed, 2 insertions(+), 6 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 57654eb..cf750fa 100755
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -23,7 +23,6 @@
     VERBOSE,
     WARNING,
 )
-from pywikibot.tools import PYTHON_VERSION
 from pywikibot.userinterfaces import (
     terminal_interface_base,
     terminal_interface_unix,
@@ -185,12 +184,9 @@
                          "    raise TestExceptionError('Testing Exception')")

         end_str = ': Testing Exception'
-        traceback_line = stderrlines[4 + (PYTHON_VERSION >= (3, 11))]
-        self.assertTrue(traceback_line.endswith(end_str),
+        self.assertTrue(stderrlines[-1].endswith(end_str),
                         '\n{!r} does not end with {!r}'
-                        .format(traceback_line, end_str))
-
-        self.assertNotEqual(stderrlines[-1], '\n')
+                        .format(stderrlines[-1], end_str))


 class TestTerminalInput(UITestCase):

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/815898
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I2d9ff415aef75d3c2bb05286fc331d35b6edfbee
Gerrit-Change-Number: 815898
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to