~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

(jam) Bug #393366,
        request the same order from fallbacks that we request from self.
        (makes annotate play nicer with stacking)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2230
2230
        # self.assertEqual([("annotate", key_basis)], basis.calls)
2231
2231
        self.assertEqual([('get_parent_map', set([key_basis])),
2232
2232
            ('get_parent_map', set([key_basis])),
2233
 
            ('get_record_stream', [key_basis], 'unordered', True)],
 
2233
            ('get_record_stream', [key_basis], 'topological', True)],
2234
2234
            basis.calls)
2235
2235
 
2236
2236
    def test_check(self):
2342
2342
        # ask which fallbacks have which parents.
2343
2343
        self.assertEqual([
2344
2344
            ("get_parent_map", set([key_basis, key_basis_2, key_missing])),
2345
 
            # unordered is asked for by the underlying worker as it still
2346
 
            # buffers everything while answering - which is a problem!
2347
 
            ("get_record_stream", [key_basis_2, key_basis], 'unordered', True)],
 
2345
            # topological is requested from the fallback, because that is what
 
2346
            # was requested at the top level.
 
2347
            ("get_record_stream", [key_basis_2, key_basis], 'topological', True)],
2348
2348
            calls)
2349
2349
 
2350
2350
    def test_get_record_stream_unordered_deltas(self):
2571
2571
        last_call = basis.calls[-1]
2572
2572
        self.assertEqual('get_record_stream', last_call[0])
2573
2573
        self.assertEqual(set([key_left, key_right]), set(last_call[1]))
2574
 
        self.assertEqual('unordered', last_call[2])
 
2574
        self.assertEqual('topological', last_call[2])
2575
2575
        self.assertEqual(True, last_call[3])
2576
2576
 
2577
2577