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

Update a clean branch with the dirstate improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
630
630
    def assertContainsRe(self, haystack, needle_re):
631
631
        """Assert that a contains something matching a regular expression."""
632
632
        if not re.search(needle_re, haystack):
633
 
            raise AssertionError('pattern "%s" not found in "%s"'
 
633
            raise AssertionError('pattern "%r" not found in "%r"'
634
634
                    % (needle_re, haystack))
635
635
 
636
636
    def assertNotContainsRe(self, haystack, needle_re):
1645
1645
            self.fail("path %s is not a directory; has mode %#o"
1646
1646
                      % (relpath, mode))
1647
1647
 
 
1648
    def assertTreesEqual(self, left, right):
 
1649
        """Check that left and right have the same content and properties."""
 
1650
        # we use a tree delta to check for equality of the content, and we
 
1651
        # manually check for equality of other things such as the parents list.
 
1652
        self.assertEqual(left.get_parent_ids(), right.get_parent_ids())
 
1653
        differences = left.changes_from(right)
 
1654
        self.assertFalse(differences.has_changed())
 
1655
 
1648
1656
    def setUp(self):
1649
1657
        super(TestCaseWithTransport, self).setUp()
1650
1658
        self.__server = None
1771
1779
                   'bzrlib.tests.test_decorators',
1772
1780
                   'bzrlib.tests.test_delta',
1773
1781
                   'bzrlib.tests.test_diff',
 
1782
                   'bzrlib.tests.test_dirstate',
1774
1783
                   'bzrlib.tests.test_doc_generate',
1775
1784
                   'bzrlib.tests.test_errors',
1776
1785
                   'bzrlib.tests.test_escaped_store',