Part of bzrlib.tests.test__dirstate_helpers View In Hierarchy
_bisect_path_* is intended to work like bisect.bisect_*() except it knows it is working on paths that are sorted by ('path', 'to', 'foo') chunks rather than by raw 'path/to/foo'.
Test Cases should inherit from this and override get_bisect_path return their implementation, and get_bisect to return the matching bisect.bisect_* function.
|Method||get_bisect_path||Return an implementation of _bisect_path_*|
|Method||get_bisect||Return a version of bisect.bisect_*.|
|Method||assertBisect||Assert that bisect_split works like bisect_left on the split paths.|
|Method||test_simple||In the simple case it works just like bisect_left|
|Method||test_involved||This is where bisect_path_* diverges slightly.|
Also, for the 'exists' check, return the offset to the real values. For example bisect_left returns the index of an entry, while bisect_right returns the index after an entry
All other arguments will be passed along.
|Parameters||paths||A list of path names|
|split_paths||A list of path names that are already split up by directory ('path/to/foo' => ('path', 'to', 'foo'))|
|path||The path we are indexing.|
|exists||The path should be present, so make sure the final location actually points to the right value.|