/breezy/unstable

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

« back to all changes in this revision

Viewing changes to breezy/tests/test_matchers.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Tests of bzrlib test matchers."""
 
17
"""Tests of breezy test matchers."""
18
18
 
19
19
from testtools.matchers import *
20
20
 
21
 
from bzrlib.smart.client import CallHookParams
 
21
from ..smart.client import CallHookParams
22
22
 
23
 
from bzrlib.tests import (
 
23
from . import (
24
24
    CapturedCall,
25
25
    TestCase,
26
26
    TestCaseWithTransport,
27
27
    )
28
 
from bzrlib.tests.matchers import *
 
28
from .matchers import *
29
29
 
30
30
 
31
31
class StubTree(object):
133
133
        mismatch = HasLayout(['a']).match(t)
134
134
        self.assertIsNot(None, mismatch)
135
135
        self.assertEqual(
136
 
            "['a'] != [u'', u'a', u'b/', u'b/c']",
137
 
            mismatch.describe())
 
136
            set(("[u'', u'a', u'b/', u'b/c']", "['a']")),
 
137
            set(mismatch.describe().split(" != ")))
138
138
 
139
139
    def test_no_dirs(self):
140
140
        # Some tree/repository formats do not support versioned directories
147
147
        mismatch = HasLayout([u'', u'a', u'd/']).match(t)
148
148
        self.assertIsNot(None, mismatch)
149
149
        self.assertEqual(
150
 
            "[u'', u'a'] != [u'', u'a', u'b/', u'b/c']",
151
 
            mismatch.describe())
 
150
            set(("[u'', u'a', u'b/', u'b/c']", "[u'', u'a']")),
 
151
            set(mismatch.describe().split(" != ")))
152
152
 
153
153
 
154
154
class TestContainsNoVfsCalls(TestCase):
200
200
        tree.commit('msg2', rev_id='b')
201
201
        matcher = RevisionHistoryMatches(['a', 'b', 'c'])
202
202
        self.assertEqual(
203
 
            "['a', 'b', 'c'] != ['a', 'b']",
204
 
            matcher.match(tree.branch).describe())
 
203
            set(("['a', 'b']", "['a', 'b', 'c']")),
 
204
            set(matcher.match(tree.branch).describe().split(" != ")))