/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/per_pack_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from stat import S_ISDIR
23
23
 
24
 
from bzrlib.btree_index import BTreeGraphIndex
25
 
from bzrlib.index import GraphIndex
26
 
from bzrlib import (
 
24
from ..btree_index import BTreeGraphIndex
 
25
from ..index import GraphIndex
 
26
from .. import (
27
27
    controldir,
28
28
    errors,
29
29
    inventory,
34
34
    transport,
35
35
    ui,
36
36
    )
37
 
from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
38
 
from bzrlib.smart import (
 
37
from ..repofmt.groupcompress_repo import RepositoryFormat2a
 
38
from ..smart import (
39
39
    client,
40
40
    )
41
 
from bzrlib.tests import (
 
41
from . import (
42
42
    TestCaseWithTransport,
43
43
    TestNotApplicable,
44
44
    )
45
 
from bzrlib.transport import (
 
45
from ..transport import (
46
46
    memory,
47
47
    )
48
 
from bzrlib.tests import test_server
 
48
from . import test_server
49
49
 
50
50
 
51
51
class TestPackRepository(TestCaseWithTransport):
283
283
        """
284
284
        repo = self.make_repository('repo')
285
285
        pack_coll = repo._pack_collection
286
 
        indices = set([pack_coll.revision_index, pack_coll.inventory_index,
287
 
                pack_coll.text_index, pack_coll.signature_index])
 
286
        indices = {pack_coll.revision_index, pack_coll.inventory_index,
 
287
                pack_coll.text_index, pack_coll.signature_index}
288
288
        if pack_coll.chk_index is not None:
289
289
            indices.add(pack_coll.chk_index)
290
290
        combined_indices = set(idx.combined_index for idx in indices)
356
356
        # revision access tends to be tip->ancestor, so ordering that way on
357
357
        # disk is a good idea.
358
358
        for _1, key, val, refs in pack.revision_index.iter_all_entries():
359
 
            if type(format.repository_format) is RepositoryFormat2a:
 
359
            if isinstance(format.repository_format, RepositoryFormat2a):
360
360
                # group_start, group_len, internal_start, internal_len
361
361
                pos = map(int, val.split())
362
362
            else:
1120
1120
            self.assertEqual(2, streaming_calls)
1121
1121
 
1122
1122
 
1123
 
def load_tests(basic_tests, module, loader):
 
1123
def load_tests(loader, basic_tests, pattern):
1124
1124
    # these give the bzrdir canned format name, and the repository on-disk
1125
1125
    # format string
1126
1126
    scenarios_params = [