~pythonregexp2.7/python/issue2636-12

« back to all changes in this revision

Viewing changes to Lib/test/test_gzip.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:52:42 UTC
  • mfrom: (39033.1.3 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609145242-9m268zc6u87rp1vp
Merged in changes from the core Regexp branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
class TestGzip(unittest.TestCase):
25
25
    filename = test_support.TESTFN
26
26
 
27
 
    def setUp (self):
28
 
        test_support.unlink(self.filename)
29
 
 
30
 
    def tearDown (self):
31
 
        test_support.unlink(self.filename)
32
 
 
33
 
 
34
 
    def test_write (self):
 
27
    def setUp(self):
 
28
        test_support.unlink(self.filename)
 
29
 
 
30
    def tearDown(self):
 
31
        test_support.unlink(self.filename)
 
32
 
 
33
 
 
34
    def test_write(self):
35
35
        f = gzip.GzipFile(self.filename, 'wb') ; f.write(data1 * 50)
36
36
 
37
37
        # Try flush and fileno.
41
41
            os.fsync(f.fileno())
42
42
        f.close()
43
43
 
 
44
        # Test multiple close() calls.
 
45
        f.close()
 
46
 
44
47
    def test_read(self):
45
48
        self.test_write()
46
49
        # Try reading.