tests/file-with: Add testcase which failed for @dpgeorge.
Works on x86.
This commit is contained in:
parent
5bf565e353
commit
072cf022e0
@ -10,3 +10,12 @@ except:
|
||||
# Note: CPython and us throw different exception trying to read from
|
||||
# close file.
|
||||
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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user