0
0
mirror of https://github.com/python/cpython.git synced 2024-11-29 17:07:13 +01:00

Merged revisions 66018 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66018 | neal.norwitz | 2008-08-24 15:03:05 -0700 (Sun, 24 Aug 2008) | 6 lines

  #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
........
This commit is contained in:
Neal Norwitz 2008-08-24 22:07:28 +00:00
parent 8f2f22ad27
commit 6e0e0e6749
2 changed files with 5 additions and 1 deletions

View File

@ -226,6 +226,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.

View File

@ -175,7 +175,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
kwlist,
Py_FileSystemDefaultEncoding,
&name, &mode, &closefd))
goto error;
return -1;
}
}