Skip to content

Test Python 3.10 #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update tests for Python 3.10
  • Loading branch information
thomasballinger committed Oct 7, 2021
commit 615b2d4cb4296cf42b78c12cae022ac8da4afcad
8 changes: 8 additions & 0 deletions bpython/test/test_curtsies_painting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
14 changes: 13 additions & 1 deletion bpython/test/test_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>"')
Expand Down