/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/test_repository.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from __future__ import absolute_import
24
24
 
25
 
from cStringIO import StringIO
26
25
from stat import S_ISDIR
27
26
import sys
28
27
 
40
39
from bzrlib.serializer import (
41
40
    format_registry as serializer_format_registry,
42
41
    )
 
42
from bzrlib.sixish import (
 
43
    BytesIO,
 
44
    )
43
45
from bzrlib.tests import (
44
46
    TestCase,
45
47
    TestCaseWithTransport,
310
312
 
311
313
    def test_canned_inventory(self):
312
314
        """Test unpacked a canned inventory v4 file."""
313
 
        inp = StringIO(_working_inventory_v4)
 
315
        inp = BytesIO(_working_inventory_v4)
314
316
        inv = xml4.serializer_v4.read_inventory(inp)
315
317
        self.assertEqual(len(inv), 4)
316
318
        self.assertTrue(inv.has_id('bar-20050901064931-73b4b1138abc9cd2'))
317
319
 
318
320
    def test_unpack_revision(self):
319
321
        """Test unpacking a canned revision v4"""
320
 
        inp = StringIO(_revision_v4)
 
322
        inp = BytesIO(_revision_v4)
321
323
        rev = xml4.serializer_v4.read_revision(inp)
322
324
        eq = self.assertEqual
323
325
        eq(rev.committer,