summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileio.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-08-24 22:03:05 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-08-24 22:03:05 (GMT)
commit901e4715bd50bd96469c7fea8c9ed22e61ff6028 (patch)
treeceb84aedaa2be351f3776577812f7d92c5befa63 /Lib/test/test_fileio.py
parentdcf48912102e3caa6f00a06ebc0a80867ec795b8 (diff)
downloadcpython-901e4715bd50bd96469c7fea8c9ed22e61ff6028.zip
cpython-901e4715bd50bd96469c7fea8c9ed22e61ff6028.tar.gz
cpython-901e4715bd50bd96469c7fea8c9ed22e61ff6028.tar.bz2
#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
Diffstat (limited to 'Lib/test/test_fileio.py')
-rw-r--r--Lib/test/test_fileio.py4
1 files changed, 4 insertions, 0 deletions
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 @@ class OtherFileTests(unittest.TestCase):
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.