Skip to content

Commit 615b2d4

Browse files
Update tests for Python 3.10
1 parent 74d919d commit 615b2d4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

bpython/test/test_curtsies_painting.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ def test_completion(self):
139139
"└──────────────────────────────┘",
140140
"Welcome to bpython! Press <F1> f",
141141
]
142+
if sys.version_info[:2] < (3, 10)
143+
else [
144+
">>> an",
145+
"┌──────────────────────────────┐",
146+
"│ and anext( any( │",
147+
"└──────────────────────────────┘",
148+
"Welcome to bpython! Press <F1> f",
149+
]
142150
)
143151
self.assert_paint_ignoring_formatting(screen, (0, 4))
144152

bpython/test/test_interpreter.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,19 @@ def test_syntaxerror(self):
3535

3636
i.runsource("1.1.1.1")
3737

38-
if sys.version_info[:2] >= (3, 8):
38+
if sys.version_info[:2] >= (3, 10):
39+
expected = (
40+
" File "
41+
+ green('"<bpython-input-148>"')
42+
+ ", line "
43+
+ bold(magenta("1"))
44+
+ "\n 1.1.1.1\n ^^^^^\n"
45+
+ bold(red("SyntaxError"))
46+
+ ": "
47+
+ cyan("invalid syntax. Perhaps you forgot a comma?")
48+
+ "\n"
49+
)
50+
elif (3, 8) <= sys.version_info[:2] <= (3, 9):
3951
expected = (
4052
" File "
4153
+ green('"<input>"')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy