Skip to content

Commit 78ead4c

Browse files
Test Python 3.10 (#924)
* Test Python 3.10 * Update tests for Python 3.10
1 parent 5ab3087 commit 78ead4c

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
continue-on-error: ${{ matrix.python-version == 'pypy3' }}
1414
strategy:
1515
matrix:
16-
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
16+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy3]
1717
steps:
1818
- uses: actions/checkout@v2
1919
with:

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