~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-05-04 17:46:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070504174616-4kdi7zi32h7ev4f9
Apply all of the tests for DirState.bisect_dirblock to the compiled function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1977
1977
    'to', 'foo') chunks rather than by raw 'path/to/foo'.
1978
1978
    """
1979
1979
 
 
1980
    bisect_dirblock_func = dirstate.bisect_dirblock
 
1981
 
1980
1982
    def assertBisect(self, dirblocks, split_dirblocks, path, *args, **kwargs):
1981
1983
        """Assert that bisect_split works like bisect_left on the split paths.
1982
1984
 
1986
1988
 
1987
1989
        All other arguments will be passed along.
1988
1990
        """
1989
 
        bisect_split_idx = dirstate.bisect_dirblock(dirblocks, path,
1990
 
                                                 *args, **kwargs)
 
1991
        bisect_split_idx = self.bisect_dirblock_func(dirblocks, path,
 
1992
                                                     *args, **kwargs)
1991
1993
        split_dirblock = (path.split('/'), [])
1992
1994
        bisect_left_idx = bisect.bisect_left(split_dirblocks, split_dirblock,
1993
1995
                                             *args)