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

Merge with __contains__

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    )
36
36
from bzrlib.errors import BinaryFile, NoDiff, ExecutableMissing
37
37
import bzrlib.osutils as osutils
 
38
import bzrlib.revision as _mod_revision
38
39
import bzrlib.transform as transform
39
40
import bzrlib.patiencediff
40
41
import bzrlib._patiencediff_py
356
357
''')
357
358
        
358
359
    def test_diff_add_files(self):
359
 
        tree1 = self.b.repository.revision_tree(None)
 
360
        tree1 = self.b.repository.revision_tree(_mod_revision.NULL_REVISION)
360
361
        tree2 = self.b.repository.revision_tree('rev-1')
361
362
        output = self.get_diff(tree1, tree2)
362
363
        # the files have the epoch time stamp for the tree in which
769
770
        self._PatienceSequenceMatcher = \
770
771
            bzrlib._patiencediff_py.PatienceSequenceMatcher_py
771
772
 
 
773
    def test_diff_unicode_string(self):
 
774
        a = ''.join([unichr(i) for i in range(4000, 4500, 3)])
 
775
        b = ''.join([unichr(i) for i in range(4300, 4800, 2)])
 
776
        sm = self._PatienceSequenceMatcher(None, a, b)
 
777
        mb = sm.get_matching_blocks()
 
778
        self.assertEquals(35, len(mb))
 
779
 
772
780
    def test_unique_lcs(self):
773
781
        unique_lcs = self._unique_lcs
774
782
        self.assertEquals(unique_lcs('', ''), [])