/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/per_transport.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-30 19:32:13 UTC
  • mfrom: (6637 work)
  • mto: This revision was merged to the branch mainline in revision 6639.
  • Revision ID: jelmer@jelmer.uk-20170530193213-qm21s6dc7dln237t
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
TransportTestProviderAdapter.
21
21
"""
22
22
 
23
 
import itertools
24
23
import os
25
24
import stat
26
25
import sys
43
42
from ..osutils import getcwd
44
43
from ..sixish import (
45
44
    BytesIO,
 
45
    zip,
46
46
    )
47
47
from ..smart import medium
48
48
from . import (
191
191
        self.build_tree(files, transport=t, line_endings='binary')
192
192
        self.check_transport_contents('contents of a\n', t, 'a')
193
193
        content_f = t.get_multi(files)
194
 
        # Use itertools.izip() instead of use zip() or map(), since they fully
195
 
        # evaluate their inputs, the transport requests should be issued and
 
194
        # Must use iter zip() from future not old version which will fully
 
195
        # evaluate its inputs, the transport requests should be issued and
196
196
        # handled sequentially (we don't want to force transport to buffer).
197
 
        for content, f in itertools.izip(contents, content_f):
 
197
        for content, f in zip(contents, content_f):
198
198
            self.assertEqual(content, f.read())
199
199
 
200
200
        content_f = t.get_multi(iter(files))
201
 
        # Use itertools.izip() for the same reason
202
 
        for content, f in itertools.izip(contents, content_f):
 
201
        # Again this zip() must come from the future
 
202
        for content, f in zip(contents, content_f):
203
203
            self.assertEqual(content, f.read())
204
204
 
205
205
    def test_get_unknown_file(self):