diff options
author | Georg Brandl <georg@python.org> | 2009-02-13 11:03:59 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-13 11:03:59 (GMT) |
commit | 0638a08a4b7998a40755f3f141c63f637b1ab144 (patch) | |
tree | 6dbdf021137d334fa8f88d41ad10c061e2a09d60 /Lib | |
parent | 5ccf2ae21cd2b12c034071e01c8ad78b57a1d6c9 (diff) | |
download | cpython-0638a08a4b7998a40755f3f141c63f637b1ab144.zip cpython-0638a08a4b7998a40755f3f141c63f637b1ab144.tar.gz cpython-0638a08a4b7998a40755f3f141c63f637b1ab144.tar.bz2 |
#3694: add test for fix committed in r66693.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_struct.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index a4dc9ca..6e35db8 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -512,6 +512,10 @@ class StructTest(unittest.TestCase): self.assertRaises(struct.error, s.pack_into, small_buf, 0, test_string) self.assertRaises(struct.error, s.pack_into, small_buf, 2, test_string) + # Test bogus offset (issue 3694) + sb = small_buf + self.assertRaises(TypeError, struct.pack_into, b'1', sb, None) + def test_pack_into_fn(self): test_string = 'Reykjavik rocks, eow!' writable_buf = array.array('c', ' '*100) |