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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
432
432
            ('text-d', ['text-c'], test_knit.TEXT_1),
433
433
            ('text-m', ['text-b', 'text-d'], test_knit.TEXT_1),
434
434
           ]
 
435
        # This test is actually a bit strict as the order in which they're
 
436
        # returned is not defined.  This matches the current (deterministic)
 
437
        # behaviour.
435
438
        expected_data_list = [
436
439
            # version, options, parents
437
440
            ('text-a', ['fulltext'], []),
438
441
            ('text-b', ['line-delta'], ['text-a']),
 
442
            ('text-m', ['line-delta'], ['text-b', 'text-d']),
439
443
            ('text-c', ['fulltext'], []),
440
444
            ('text-d', ['line-delta'], ['text-c']),
441
 
            ('text-m', ['line-delta'], ['text-b', 'text-d']),
442
445
            ]
443
446
        for version_id, parents, lines in test_data:
444
447
            k1.add_lines(version_id, parents, test_knit.split_lines(lines))
445
448
 
446
449
        bytes = knitrepo._get_stream_as_bytes(
447
 
            k1, ['text-a', 'text-b', 'text-c', 'text-d', 'text-m'])
 
450
            k1, ['text-a', 'text-b', 'text-m', 'text-c', 'text-d', ])
448
451
 
449
452
        data = bencode.bdecode(bytes)
450
453
        format = data.pop(0)
1192
1195
        repo = self.make_repository('.', format=format)
1193
1196
        packs = repo._pack_collection
1194
1197
        self.assertEqual([0], packs.pack_distribution(0))
1195
 
        
 
1198
 
 
1199
    def test_ensure_loaded_unlocked(self):
 
1200
        format = self.get_format()
 
1201
        repo = self.make_repository('.', format=format)
 
1202
        self.assertRaises(errors.ObjectNotLocked,
 
1203
                          repo._pack_collection.ensure_loaded)
 
1204
 
1196
1205
    def test_pack_distribution_one_to_nine(self):
1197
1206
        format = self.get_format()
1198
1207
        repo = self.make_repository('.', format=format)