/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 breezy/tests/test_export.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for breezy.export."""
18
18
 
19
 
from cStringIO import StringIO
20
19
import os
21
20
import tarfile
22
21
import time
23
22
import zipfile
24
23
 
25
 
from breezy import (
 
24
from .. import (
26
25
    errors,
27
26
    export,
28
27
    tests,
29
28
    )
30
 
from breezy.export import get_root_name
31
 
from breezy.export.tar_exporter import export_tarball_generator
32
 
from breezy.tests import features
 
29
from ..export import get_root_name
 
30
from ..export.tar_exporter import export_tarball_generator
 
31
from ..sixish import (
 
32
    BytesIO,
 
33
    )
 
34
from . import features
33
35
 
34
36
 
35
37
class TestDirExport(tests.TestCaseWithTransport):
131
133
        builder.start_series()
132
134
        # Earliest allowable date on FAT32 filesystems is 1980-01-01
133
135
        a_time = time.mktime((1999, 12, 12, 0, 0, 0, 0, 0, 0))
134
 
        b_time = time.mktime((1980, 01, 01, 0, 0, 0, 0, 0, 0))
 
136
        b_time = time.mktime((1980, 0o1, 0o1, 0, 0, 0, 0, 0, 0))
135
137
        builder.build_snapshot(None, None, [
136
138
            ('add', ('', 'root-id', 'directory', '')),
137
139
            ('add', ('a', 'a-id', 'file', 'content\n'))],
247
249
        self.build_tree(['a'])
248
250
        wt.add(["a"])
249
251
        wt.commit("1", timestamp=42)
250
 
        target = StringIO()
 
252
        target = BytesIO()
251
253
        ball = tarfile.open(None, "w|", target)
252
254
        wt.lock_read()
253
255
        try: