Skip to content
Snippets Groups Projects
Commit 072cf022 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/file-with: Add testcase which failed for @dpgeorge.

Works on x86.
parent 5bf565e3
No related branches found
No related tags found
No related merge requests found
...@@ -10,3 +10,12 @@ except: ...@@ -10,3 +10,12 @@ except:
# Note: CPython and us throw different exception trying to read from # Note: CPython and us throw different exception trying to read from
# close file. # close file.
print("can't read file after with") print("can't read file after with")
# Regression test: test that exception in with initialization properly
# thrown and doesn't crash.
try:
with open('__non_existent', 'r'):
pass
except OSError:
print("OSError")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment