~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_tuned_gzip.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
class TestToGzip(tests.TestCase):
107
107
 
108
108
    def assertToGzip(self, chunks):
109
 
        raw_bytes = ''.join(chunks)
 
109
        bytes = ''.join(chunks)
110
110
        gzfromchunks = tuned_gzip.chunks_to_gzip(chunks)
111
 
        gzfrombytes = tuned_gzip.bytes_to_gzip(raw_bytes)
 
111
        gzfrombytes = tuned_gzip.bytes_to_gzip(bytes)
112
112
        self.assertEqual(gzfrombytes, gzfromchunks)
113
113
        decoded = self.applyDeprecated(
114
114
            symbol_versioning.deprecated_in((2, 3, 0)),
115
115
            tuned_gzip.GzipFile, fileobj=StringIO(gzfromchunks)).read()
116
 
        lraw, ldecoded = len(raw_bytes), len(decoded)
117
 
        self.assertEqual(lraw, ldecoded,
118
 
                         'Expecting data length %d, got %d' % (lraw, ldecoded))
119
 
        self.assertEqual(raw_bytes, decoded)
 
116
        self.assertEqual(bytes, decoded)
120
117
 
121
118
    def test_single_chunk(self):
122
119
        self.assertToGzip(['a modest chunk\nwith some various\nbits\n'])