mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-16 00:00:25 +03:00
Closes: https://bugs.gentoo.org/812305 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From 78ead4c83d7c47c35ab075dd08114f51c24a709d Mon Sep 17 00:00:00 2001
|
|
From: Thomas Ballinger <thomasballinger@gmail.com>
|
|
Date: Wed, 6 Oct 2021 19:59:38 -0700
|
|
Subject: [PATCH] Test Python 3.10 (#924)
|
|
|
|
* Test Python 3.10
|
|
* Update tests for Python 3.10
|
|
|
|
--- a/bpython/test/test_curtsies_painting.py
|
|
+++ b/bpython/test/test_curtsies_painting.py
|
|
@@ -139,6 +139,14 @@ def test_completion(self):
|
|
"└──────────────────────────────┘",
|
|
"Welcome to bpython! Press <F1> f",
|
|
]
|
|
+ if sys.version_info[:2] < (3, 10)
|
|
+ else [
|
|
+ ">>> an",
|
|
+ "┌──────────────────────────────┐",
|
|
+ "│ and anext( any( │",
|
|
+ "└──────────────────────────────┘",
|
|
+ "Welcome to bpython! Press <F1> f",
|
|
+ ]
|
|
)
|
|
self.assert_paint_ignoring_formatting(screen, (0, 4))
|
|
|
|
--- a/bpython/test/test_interpreter.py
|
|
+++ b/bpython/test/test_interpreter.py
|
|
@@ -35,7 +35,19 @@ def test_syntaxerror(self):
|
|
|
|
i.runsource("1.1.1.1")
|
|
|
|
- if sys.version_info[:2] >= (3, 8):
|
|
+ if sys.version_info[:2] >= (3, 10):
|
|
+ expected = (
|
|
+ " File "
|
|
+ + green('"<bpython-input-148>"')
|
|
+ + ", line "
|
|
+ + bold(magenta("1"))
|
|
+ + "\n 1.1.1.1\n ^^^^^\n"
|
|
+ + bold(red("SyntaxError"))
|
|
+ + ": "
|
|
+ + cyan("invalid syntax. Perhaps you forgot a comma?")
|
|
+ + "\n"
|
|
+ )
|
|
+ elif (3, 8) <= sys.version_info[:2] <= (3, 9):
|
|
expected = (
|
|
" File "
|
|
+ green('"<input>"')
|