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

Side by Side Diff: Lib/test/test_bz2.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « Lib/test/test_ast.py ('k') | Lib/test/test_capi.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 from test import support 2 from test import support
3 from test.support import TESTFN, precisionbigmemtest, _4G 3 from test.support import TESTFN, precisionbigmemtest, _4G
4 4
5 import unittest 5 import unittest
6 from io import BytesIO 6 from io import BytesIO
7 import os 7 import os
8 import random 8 import random
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 def testSeekPreStartMultiStream(self): 334 def testSeekPreStartMultiStream(self):
335 self.createTempFile(streams=2) 335 self.createTempFile(streams=2)
336 with BZ2File(self.filename) as bz2f: 336 with BZ2File(self.filename) as bz2f:
337 bz2f.seek(-150) 337 bz2f.seek(-150)
338 self.assertEqual(bz2f.tell(), 0) 338 self.assertEqual(bz2f.tell(), 0)
339 self.assertEqual(bz2f.read(), self.TEXT * 2) 339 self.assertEqual(bz2f.read(), self.TEXT * 2)
340 340
341 def testFileno(self): 341 def testFileno(self):
342 self.createTempFile() 342 self.createTempFile()
343 with open(self.filename, 'rb') as rawf: 343 with open(self.filename) as rawf:
344 with BZ2File(fileobj=rawf) as bz2f: 344 with BZ2File(fileobj=rawf) as bz2f:
345 self.assertEqual(bz2f.fileno(), rawf.fileno()) 345 self.assertEqual(bz2f.fileno(), rawf.fileno())
346 346
347 def testOpenDel(self): 347 def testOpenDel(self):
348 self.createTempFile() 348 self.createTempFile()
349 for i in range(10000): 349 for i in range(10000):
350 o = BZ2File(self.filename) 350 o = BZ2File(self.filename)
351 del o 351 del o
352 352
353 def testOpenNonexistent(self): 353 def testOpenNonexistent(self):
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 support.run_unittest( 584 support.run_unittest(
585 BZ2FileTest, 585 BZ2FileTest,
586 BZ2CompressorTest, 586 BZ2CompressorTest,
587 BZ2DecompressorTest, 587 BZ2DecompressorTest,
588 FuncTest 588 FuncTest
589 ) 589 )
590 support.reap_children() 590 support.reap_children()
591 591
592 if __name__ == '__main__': 592 if __name__ == '__main__':
593 test_main() 593 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_ast.py ('k') | Lib/test/test_capi.py » ('j') | no next file with comments »

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