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

Works on x86.
This commit is contained in:
Paul Sokolovsky 2014-04-04 12:14:11 +03:00
parent 5bf565e353
commit 072cf022e0

View file

@ -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")