Skip to content
Merged
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
Special case MacOS for now, add a note for future sanity.
  • Loading branch information
DimitrisJim committed Jun 17, 2023
commit 332edf304f489fb9edb2ef8d34be26e194ec9438
10 changes: 9 additions & 1 deletion extra_tests/snippets/syntax_non_utf8.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

dir_path = os.path.dirname(os.path.realpath(__file__))

with assert_raises(SyntaxError):
# TODO: RUSTPYTHON. At some point snippets will fail and it will look confusing
# and out of the blue. This is going to be the cause and it's going to happen when
# the github worker for MacOS starts using Python 3.11.4.
if platform.python_implementation == "CPython" and platform.system() == 'Darwin':
expectedException = ValueError
else:
expectedException = SyntaxError

with assert_raises(expectedException):
with open(os.path.join(dir_path , "non_utf8.txt")) as f:
eval(f.read())