[Python-checkins] cpython: Added test for 85cb90f79cbf and see how the code handles all flags at once

christian.heimes python-checkins at python.org
Mon Sep 10 14:48:59 CEST 2012


http://hg.python.org/cpython/rev/5a81a0836da1
changeset:   78957:5a81a0836da1
parent:      78954:9def2209a839
user:        Christian Heimes <christian at cheimes.de>
date:        Mon Sep 10 14:48:43 2012 +0200
summary:
  Added test for 85cb90f79cbf and see how the code handles all flags at once

files:
  Lib/test/test_io.py |  5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2887,6 +2887,11 @@
         with self.open(support.TESTFN, 'rb') as f:
             self.assertEqual(b"spam", f.read())
 
+    def test_open_allargs(self):
+        # there used to be a buffer overflow in the parser for rawmode
+        self.assertRaises(ValueError, self.open, support.TESTFN, 'rwax+')
+
+
 class CMiscIOTest(MiscIOTest):
     io = io
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list