~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_dirstate.py

  • Committer: John Arbash Meinel
  • Date: 2007-07-11 22:59:35 UTC
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070711225935-llcal92udviwxfp4
Finish fixing DirState._bisect and the bisect tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1843
1843
        # Bisect should be capable of finding multiple entries at the same time
1844
1844
        self.assertBisect(expected, [['a'], ['b'], ['f']],
1845
1845
                          state, ['a', 'b', 'f'])
1846
 
        # ('', 'f') sorts before the others
1847
1846
        self.assertBisect(expected, [['f'], ['b/d'], ['b/d/e']],
1848
 
                          state, ['b/d', 'b/d/e', 'f'])
1849
 
        self.assertBisect(expected, [['b'], ['b/c'], ['b-c']],
1850
 
                          state, ['b', 'b/c', 'b-c'])
 
1847
                          state, ['f', 'b/d', 'b/d/e'])
 
1848
        self.assertBisect(expected, [['b'], ['b-c'], ['b/c']],
 
1849
                          state, ['b', 'b-c', 'b/c'])
1851
1850
 
1852
1851
    def test_bisect_one_page(self):
1853
1852
        """Test bisect when there is only 1 page to read"""
1863
1862
        self.assertBisect(expected,[['f']], state, ['f'])
1864
1863
        self.assertBisect(expected,[['a'], ['b'], ['f']],
1865
1864
                          state, ['a', 'b', 'f'])
1866
 
        # ('', 'f') sorts before the others
1867
 
        self.assertBisect(expected, [['f'], ['b/d'], ['b/d/e']],
 
1865
        self.assertBisect(expected, [['b/d'], ['b/d/e'], ['f']],
1868
1866
                          state, ['b/d', 'b/d/e', 'f'])
1869
1867
        self.assertBisect(expected, [['b'], ['b/c'], ['b-c']],
1870
1868
                          state, ['b', 'b/c', 'b-c'])
1958
1956
                                   state, ['b/d'])
1959
1957
        self.assertBisectRecursive(expected, ['b', 'b/c', 'b/d', 'b/d/e'],
1960
1958
                                   state, ['b'])
1961
 
        self.assertBisectRecursive(expected, ['', 'a', 'b', 'f', 'b/c',
 
1959
        self.assertBisectRecursive(expected, ['', 'a', 'b', 'b-c', 'f', 'b/c',
1962
1960
                                              'b/d', 'b/d/e'],
1963
1961
                                   state, [''])
1964
1962