#3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 9f70a73..a8b15fa 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -227,6 +227,10 @@
except:
pass
+ def testInvalidInit(self):
+ self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)
+
+
def test_main():
# Historically, these tests have been sloppy about removing TESTFN.
# So get rid of it no matter what.