/breezy/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/trunk

« back to all changes in this revision

Viewing changes to breezy/tests/matchers.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
from breezy.bzr.smart.request import request_handlers as smart_request_handlers
45
45
from breezy.bzr.smart import vfs
46
46
""")
 
47
from ..sixish import (
 
48
    text_type,
 
49
    )
47
50
 
48
51
from testtools.matchers import Equals, Mismatch, Matcher
49
52
 
156
159
        """
157
160
        directories = []
158
161
        for entry in entries:
159
 
            if isinstance(entry, basestring):
 
162
            if isinstance(entry, (str, text_type)):
160
163
                path = entry
161
164
            else:
162
165
                path = entry[0]
176
179
 
177
180
    def match(self, tree):
178
181
        actual = list(self.get_tree_layout(tree))
179
 
        if self.entries and isinstance(self.entries[0], basestring):
 
182
        if self.entries and isinstance(self.entries[0], (str, text_type)):
180
183
            actual = [path for (path, fileid) in actual]
181
184
        if not tree.has_versioned_directories():
182
185
            entries = list(self._strip_unreferenced_directories(self.entries))