summaryrefslogtreecommitdiff
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-09-29 09:27:15 +0200
committerGeorg Brandl <georg@python.org>2012-09-29 09:27:15 +0200
commit99a247fd01c1cd780c0c3ee1116657627f1ee744 (patch)
tree319e33cb6612c3fafb2eb82e15c5e85e3d771e4f /Lib/test/test_io.py
parent1628eaa5dc8892ff381ca7558cc7c8d80fac494d (diff)
parent8ed677db129171317b8ee7cd45b39b9013f5a2d6 (diff)
downloadcpython-git-99a247fd01c1cd780c0c3ee1116657627f1ee744.tar.gz
Merge with main repo default branch.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 57353506ea..d5eec7c221 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2887,6 +2887,11 @@ class MiscIOTest(unittest.TestCase):
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