~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-12 00:08:41 UTC
  • mfrom: (5590.1.6 2.3-gzip-py2.7)
  • Revision ID: pqm@pqm.ubuntu.com-20110112000841-bsgwos6fnhv9nlc7
(jameinel) Stop using bzrlib.tuned_gzip.GzipFile. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""Tests for Knit data structure"""
18
18
 
19
19
from cStringIO import StringIO
 
20
import gzip
20
21
import sys
21
22
 
22
23
from bzrlib import (
27
28
    pack,
28
29
    tests,
29
30
    transport,
30
 
    tuned_gzip,
31
31
    )
32
32
from bzrlib.errors import (
33
33
    KnitHeaderError,
692
692
 
693
693
    def create_gz_content(self, text):
694
694
        sio = StringIO()
695
 
        gz_file = tuned_gzip.GzipFile(mode='wb', fileobj=sio)
 
695
        gz_file = gzip.GzipFile(mode='wb', fileobj=sio)
696
696
        gz_file.write(text)
697
697
        gz_file.close()
698
698
        return sio.getvalue()