~ubuntu-branches/ubuntu/precise/python3.2/precise-proposed

« back to all changes in this revision

Viewing changes to Lib/test/test_gzip.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-09 18:40:39 UTC
  • mfrom: (30.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120309184039-j3yk2emxr1plyo21
Tags: 3.2.3~rc1-1
* Python 3.2.3 release candidate 1.
* Update to 20120309 from the 3.2 branch.
* Fix libpython.a symlink. Closes: #660146.
* Build-depend on xauth.
* Run the gdb tests for the debug build only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
            self.assertEqual(f.read(100), b'')
324
324
            self.assertEqual(nread, len(uncompressed))
325
325
 
 
326
    def test_fileobj_from_fdopen(self):
 
327
        # Issue #13781: Opening a GzipFile for writing fails when using a
 
328
        # fileobj created with os.fdopen().
 
329
        fd = os.open(self.filename, os.O_WRONLY | os.O_CREAT)
 
330
        with os.fdopen(fd, "wb") as f:
 
331
            with gzip.GzipFile(fileobj=f, mode="w") as g:
 
332
                pass
 
333
 
326
334
    # Testing compress/decompress shortcut functions
327
335
 
328
336
    def test_compress(self):