Added test for 85cb90f79cbf and see how the code handles all flags at once

This commit is contained in:
Christian Heimes 2012-09-10 14:48:43 +02:00
parent c3a2c59806
commit 7b648753ab
1 changed files with 5 additions and 0 deletions

View File

@ -2887,6 +2887,11 @@ class MiscIOTest(unittest.TestCase):
with self.open(support.TESTFN, 'rb') as f: with self.open(support.TESTFN, 'rb') as f:
self.assertEqual(b"spam", f.read()) 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): class CMiscIOTest(MiscIOTest):
io = io io = io