Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Unified Diff: Lib/test/test_marshal.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_mailbox.py ('k') | Lib/test/test_minidom.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_marshal.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/test/test_marshal.py Mon Jul 25 09:47:18 2011 -0400
@@ -228,30 +228,6 @@
invalid_string = b'l\x02\x00\x00\x00\x00\x00\x00\x00'
self.assertRaises(ValueError, marshal.loads, invalid_string)
- def test_multiple_dumps_and_loads(self):
- # Issue 12291: marshal.load() should be callable multiple times
- # with interleaved data written by non-marshal code
- # Adapted from a patch by Engelbert Gruber.
- data = (1, 'abc', b'def', 1.0, (2, 'a', ['b', b'c']))
- for interleaved in (b'', b'0123'):
- ilen = len(interleaved)
- positions = []
- try:
- with open(support.TESTFN, 'wb') as f:
- for d in data:
- marshal.dump(d, f)
- if ilen:
- f.write(interleaved)
- positions.append(f.tell())
- with open(support.TESTFN, 'rb') as f:
- for i, d in enumerate(data):
- self.assertEqual(d, marshal.load(f))
- if ilen:
- f.read(ilen)
- self.assertEqual(positions[i], f.tell())
- finally:
- support.unlink(support.TESTFN)
-
def test_main():
support.run_unittest(IntTestCase,
« no previous file with comments | « Lib/test/test_mailbox.py ('k') | Lib/test/test_minidom.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+