~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Matt Nordhoff
  • Date: 2009-06-23 05:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4474.
  • Revision ID: mnordhoff@mattnordhoff.com-20090623051207-fksdtbzkwtnrw9dd
Update _add_text docstrings that still referred to add_text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                           UnknownFormatError,
32
32
                           UnsupportedFormatError,
33
33
                           )
34
 
from bzrlib import (
35
 
    graph,
36
 
    tests,
37
 
    )
 
34
from bzrlib import graph
38
35
from bzrlib.branchbuilder import BranchBuilder
39
36
from bzrlib.btree_index import BTreeBuilder, BTreeGraphIndex
40
37
from bzrlib.index import GraphIndex, InMemoryGraphIndex
51
48
    get_transport,
52
49
    )
53
50
from bzrlib.transport.memory import MemoryServer
 
51
from bzrlib.util import bencode
54
52
from bzrlib import (
55
 
    bencode,
56
53
    bzrdir,
57
54
    errors,
58
55
    inventory,
486
483
    _serializer = None
487
484
 
488
485
    def supports_rich_root(self):
489
 
        if self._format is not None:
490
 
            return self._format.rich_root_data
491
486
        return False
492
487
 
493
488
    def get_graph(self):
544
539
        # pair that it returns true on for the is_compatible static method
545
540
        # check
546
541
        dummy_a = DummyRepository()
547
 
        dummy_a._format = RepositoryFormat()
548
542
        dummy_b = DummyRepository()
549
 
        dummy_b._format = RepositoryFormat()
550
543
        repo = self.make_repository('.')
551
544
        # hack dummies to look like repo somewhat.
552
545
        dummy_a._serializer = repo._serializer
553
 
        dummy_a._format.supports_tree_reference = repo._format.supports_tree_reference
554
 
        dummy_a._format.rich_root_data = repo._format.rich_root_data
555
546
        dummy_b._serializer = repo._serializer
556
 
        dummy_b._format.supports_tree_reference = repo._format.supports_tree_reference
557
 
        dummy_b._format.rich_root_data = repo._format.rich_root_data
558
547
        repository.InterRepository.register_optimiser(InterDummy)
559
548
        try:
560
549
            # we should get the default for something InterDummy returns False
681
670
        self.assertFalse(repo._format.supports_external_lookups)
682
671
 
683
672
 
684
 
class Test2a(tests.TestCaseWithMemoryTransport):
685
 
 
686
 
    def test_fetch_combines_groups(self):
687
 
        builder = self.make_branch_builder('source', format='2a')
688
 
        builder.start_series()
689
 
        builder.build_snapshot('1', None, [
690
 
            ('add', ('', 'root-id', 'directory', '')),
691
 
            ('add', ('file', 'file-id', 'file', 'content\n'))])
692
 
        builder.build_snapshot('2', ['1'], [
693
 
            ('modify', ('file-id', 'content-2\n'))])
694
 
        builder.finish_series()
695
 
        source = builder.get_branch()
696
 
        target = self.make_repository('target', format='2a')
697
 
        target.fetch(source.repository)
698
 
        target.lock_read()
699
 
        self.addCleanup(target.unlock)
700
 
        details = target.texts._index.get_build_details(
701
 
            [('file-id', '1',), ('file-id', '2',)])
702
 
        file_1_details = details[('file-id', '1')]
703
 
        file_2_details = details[('file-id', '2')]
704
 
        # The index, and what to read off disk, should be the same for both
705
 
        # versions of the file.
706
 
        self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
707
 
 
708
 
    def test_format_pack_compresses_True(self):
709
 
        repo = self.make_repository('repo', format='2a')
710
 
        self.assertTrue(repo._format.pack_compresses)
 
673
class TestDevelopment6(TestCaseWithTransport):
711
674
 
712
675
    def test_inventories_use_chk_map_with_parent_base_dict(self):
713
 
        tree = self.make_branch_and_memory_tree('repo', format="2a")
714
 
        tree.lock_write()
715
 
        tree.add([''], ['TREE_ROOT'])
 
676
        tree = self.make_branch_and_tree('repo', format="development6-rich-root")
716
677
        revid = tree.commit("foo")
717
 
        tree.unlock()
718
678
        tree.lock_read()
719
679
        self.addCleanup(tree.unlock)
720
680
        inv = tree.branch.repository.get_inventory(revid)
725
685
        self.assertEqual(65536,
726
686
            inv.parent_id_basename_to_file_id._root_node.maximum_size)
727
687
 
728
 
    def test_autopack_unchanged_chk_nodes(self):
729
 
        # at 20 unchanged commits, chk pages are packed that are split into
730
 
        # two groups such that the new pack being made doesn't have all its
731
 
        # pages in the source packs (though they are in the repository).
732
 
        # Use a memory backed repository, we don't need to hit disk for this
733
 
        tree = self.make_branch_and_memory_tree('tree', format='2a')
734
 
        tree.lock_write()
735
 
        self.addCleanup(tree.unlock)
736
 
        tree.add([''], ['TREE_ROOT'])
737
 
        for pos in range(20):
738
 
            tree.commit(str(pos))
739
 
 
740
 
    def test_pack_with_hint(self):
741
 
        tree = self.make_branch_and_memory_tree('tree', format='2a')
742
 
        tree.lock_write()
743
 
        self.addCleanup(tree.unlock)
744
 
        tree.add([''], ['TREE_ROOT'])
745
 
        # 1 commit to leave untouched
746
 
        tree.commit('1')
747
 
        to_keep = tree.branch.repository._pack_collection.names()
748
 
        # 2 to combine
749
 
        tree.commit('2')
750
 
        tree.commit('3')
751
 
        all = tree.branch.repository._pack_collection.names()
752
 
        combine = list(set(all) - set(to_keep))
753
 
        self.assertLength(3, all)
754
 
        self.assertLength(2, combine)
755
 
        tree.branch.repository.pack(hint=combine)
756
 
        final = tree.branch.repository._pack_collection.names()
757
 
        self.assertLength(2, final)
758
 
        self.assertFalse(combine[0] in final)
759
 
        self.assertFalse(combine[1] in final)
760
 
        self.assertSubset(to_keep, final)
761
 
 
762
 
    def test_stream_source_to_gc(self):
763
 
        source = self.make_repository('source', format='2a')
764
 
        target = self.make_repository('target', format='2a')
765
 
        stream = source._get_source(target._format)
766
 
        self.assertIsInstance(stream, groupcompress_repo.GroupCHKStreamSource)
767
 
 
768
 
    def test_stream_source_to_non_gc(self):
769
 
        source = self.make_repository('source', format='2a')
770
 
        target = self.make_repository('target', format='rich-root-pack')
771
 
        stream = source._get_source(target._format)
772
 
        # We don't want the child GroupCHKStreamSource
773
 
        self.assertIs(type(stream), repository.StreamSource)
774
 
 
775
 
    def test_get_stream_for_missing_keys_includes_all_chk_refs(self):
776
 
        source_builder = self.make_branch_builder('source',
777
 
                            format='2a')
778
 
        # We have to build a fairly large tree, so that we are sure the chk
779
 
        # pages will have split into multiple pages.
780
 
        entries = [('add', ('', 'a-root-id', 'directory', None))]
781
 
        for i in 'abcdefghijklmnopqrstuvwxyz123456789':
782
 
            for j in 'abcdefghijklmnopqrstuvwxyz123456789':
783
 
                fname = i + j
784
 
                fid = fname + '-id'
785
 
                content = 'content for %s\n' % (fname,)
786
 
                entries.append(('add', (fname, fid, 'file', content)))
787
 
        source_builder.start_series()
788
 
        source_builder.build_snapshot('rev-1', None, entries)
789
 
        # Now change a few of them, so we get a few new pages for the second
790
 
        # revision
791
 
        source_builder.build_snapshot('rev-2', ['rev-1'], [
792
 
            ('modify', ('aa-id', 'new content for aa-id\n')),
793
 
            ('modify', ('cc-id', 'new content for cc-id\n')),
794
 
            ('modify', ('zz-id', 'new content for zz-id\n')),
795
 
            ])
796
 
        source_builder.finish_series()
797
 
        source_branch = source_builder.get_branch()
798
 
        source_branch.lock_read()
799
 
        self.addCleanup(source_branch.unlock)
800
 
        target = self.make_repository('target', format='2a')
801
 
        source = source_branch.repository._get_source(target._format)
802
 
        self.assertIsInstance(source, groupcompress_repo.GroupCHKStreamSource)
803
 
 
804
 
        # On a regular pass, getting the inventories and chk pages for rev-2
805
 
        # would only get the newly created chk pages
806
 
        search = graph.SearchResult(set(['rev-2']), set(['rev-1']), 1,
807
 
                                    set(['rev-2']))
808
 
        simple_chk_records = []
809
 
        for vf_name, substream in source.get_stream(search):
810
 
            if vf_name == 'chk_bytes':
811
 
                for record in substream:
812
 
                    simple_chk_records.append(record.key)
813
 
            else:
814
 
                for _ in substream:
815
 
                    continue
816
 
        # 3 pages, the root (InternalNode), + 2 pages which actually changed
817
 
        self.assertEqual([('sha1:91481f539e802c76542ea5e4c83ad416bf219f73',),
818
 
                          ('sha1:4ff91971043668583985aec83f4f0ab10a907d3f',),
819
 
                          ('sha1:81e7324507c5ca132eedaf2d8414ee4bb2226187',),
820
 
                          ('sha1:b101b7da280596c71a4540e9a1eeba8045985ee0',)],
821
 
                         simple_chk_records)
822
 
        # Now, when we do a similar call using 'get_stream_for_missing_keys'
823
 
        # we should get a much larger set of pages.
824
 
        missing = [('inventories', 'rev-2')]
825
 
        full_chk_records = []
826
 
        for vf_name, substream in source.get_stream_for_missing_keys(missing):
827
 
            if vf_name == 'inventories':
828
 
                for record in substream:
829
 
                    self.assertEqual(('rev-2',), record.key)
830
 
            elif vf_name == 'chk_bytes':
831
 
                for record in substream:
832
 
                    full_chk_records.append(record.key)
833
 
            else:
834
 
                self.fail('Should not be getting a stream of %s' % (vf_name,))
835
 
        # We have 257 records now. This is because we have 1 root page, and 256
836
 
        # leaf pages in a complete listing.
837
 
        self.assertEqual(257, len(full_chk_records))
838
 
        self.assertSubset(simple_chk_records, full_chk_records)
839
 
 
840
 
    def test_inconsistency_fatal(self):
841
 
        repo = self.make_repository('repo', format='2a')
842
 
        self.assertTrue(repo.revisions._index._inconsistency_fatal)
843
 
        self.assertFalse(repo.texts._index._inconsistency_fatal)
844
 
        self.assertFalse(repo.inventories._index._inconsistency_fatal)
845
 
        self.assertFalse(repo.signatures._index._inconsistency_fatal)
846
 
        self.assertFalse(repo.chk_bytes._index._inconsistency_fatal)
847
 
 
848
 
 
849
 
class TestKnitPackStreamSource(tests.TestCaseWithMemoryTransport):
850
 
 
851
 
    def test_source_to_exact_pack_092(self):
852
 
        source = self.make_repository('source', format='pack-0.92')
853
 
        target = self.make_repository('target', format='pack-0.92')
854
 
        stream_source = source._get_source(target._format)
855
 
        self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
856
 
 
857
 
    def test_source_to_exact_pack_rich_root_pack(self):
858
 
        source = self.make_repository('source', format='rich-root-pack')
859
 
        target = self.make_repository('target', format='rich-root-pack')
860
 
        stream_source = source._get_source(target._format)
861
 
        self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
862
 
 
863
 
    def test_source_to_exact_pack_19(self):
864
 
        source = self.make_repository('source', format='1.9')
865
 
        target = self.make_repository('target', format='1.9')
866
 
        stream_source = source._get_source(target._format)
867
 
        self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
868
 
 
869
 
    def test_source_to_exact_pack_19_rich_root(self):
870
 
        source = self.make_repository('source', format='1.9-rich-root')
871
 
        target = self.make_repository('target', format='1.9-rich-root')
872
 
        stream_source = source._get_source(target._format)
873
 
        self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
874
 
 
875
 
    def test_source_to_remote_exact_pack_19(self):
876
 
        trans = self.make_smart_server('target')
877
 
        trans.ensure_base()
878
 
        source = self.make_repository('source', format='1.9')
879
 
        target = self.make_repository('target', format='1.9')
880
 
        target = repository.Repository.open(trans.base)
881
 
        stream_source = source._get_source(target._format)
882
 
        self.assertIsInstance(stream_source, pack_repo.KnitPackStreamSource)
883
 
 
884
 
    def test_stream_source_to_non_exact(self):
885
 
        source = self.make_repository('source', format='pack-0.92')
886
 
        target = self.make_repository('target', format='1.9')
887
 
        stream = source._get_source(target._format)
888
 
        self.assertIs(type(stream), repository.StreamSource)
889
 
 
890
 
    def test_stream_source_to_non_exact_rich_root(self):
891
 
        source = self.make_repository('source', format='1.9')
892
 
        target = self.make_repository('target', format='1.9-rich-root')
893
 
        stream = source._get_source(target._format)
894
 
        self.assertIs(type(stream), repository.StreamSource)
895
 
 
896
 
    def test_source_to_remote_non_exact_pack_19(self):
897
 
        trans = self.make_smart_server('target')
898
 
        trans.ensure_base()
899
 
        source = self.make_repository('source', format='1.9')
900
 
        target = self.make_repository('target', format='1.6')
901
 
        target = repository.Repository.open(trans.base)
902
 
        stream_source = source._get_source(target._format)
903
 
        self.assertIs(type(stream_source), repository.StreamSource)
904
 
 
905
 
    def test_stream_source_to_knit(self):
906
 
        source = self.make_repository('source', format='pack-0.92')
907
 
        target = self.make_repository('target', format='dirstate')
908
 
        stream = source._get_source(target._format)
909
 
        self.assertIs(type(stream), repository.StreamSource)
910
 
 
911
688
 
912
689
class TestDevelopment6FindParentIdsOfRevisions(TestCaseWithTransport):
913
690
    """Tests for _find_parent_ids_of_revisions."""
1048
825
        """
1049
826
        broken_repo = self.make_broken_repository()
1050
827
        empty_repo = self.make_repository('empty-repo')
1051
 
        try:
1052
 
            empty_repo.fetch(broken_repo)
1053
 
        except (errors.RevisionNotPresent, errors.BzrCheckError):
1054
 
            # Test successful: compression parent not being copied leads to
1055
 
            # error.
1056
 
            return
1057
 
        empty_repo.lock_read()
1058
 
        self.addCleanup(empty_repo.unlock)
1059
 
        text = empty_repo.texts.get_record_stream(
1060
 
            [('file2-id', 'rev3')], 'topological', True).next()
1061
 
        self.assertEqual('line\n', text.get_bytes_as('fulltext'))
 
828
        self.assertRaises((errors.RevisionNotPresent, errors.BzrCheckError),
 
829
                          empty_repo.fetch, broken_repo)
1062
830
 
1063
831
 
1064
832
class TestRepositoryPackCollection(TestCaseWithTransport):
1073
841
 
1074
842
    def make_packs_and_alt_repo(self, write_lock=False):
1075
843
        """Create a pack repo with 3 packs, and access it via a second repo."""
1076
 
        tree = self.make_branch_and_tree('.', format=self.get_format())
 
844
        tree = self.make_branch_and_tree('.')
1077
845
        tree.lock_write()
1078
846
        self.addCleanup(tree.unlock)
1079
847
        rev1 = tree.commit('one')
1389
1157
    """Tests for the packs repository Packer class."""
1390
1158
 
1391
1159
    def test_pack_optimizes_pack_order(self):
1392
 
        builder = self.make_branch_builder('.', format="1.9")
 
1160
        builder = self.make_branch_builder('.')
1393
1161
        builder.start_series()
1394
1162
        builder.build_snapshot('A', None, [
1395
1163
            ('add', ('', 'root-id', 'directory', None)),
1438
1206
        self.assertTrue(new_pack.signature_index._optimize_for_size)
1439
1207
 
1440
1208
 
1441
 
class TestCrossFormatPacks(TestCaseWithTransport):
1442
 
 
1443
 
    def log_pack(self, hint=None):
1444
 
        self.calls.append(('pack', hint))
1445
 
        self.orig_pack(hint=hint)
1446
 
        if self.expect_hint:
1447
 
            self.assertTrue(hint)
1448
 
 
1449
 
    def run_stream(self, src_fmt, target_fmt, expect_pack_called):
1450
 
        self.expect_hint = expect_pack_called
1451
 
        self.calls = []
1452
 
        source_tree = self.make_branch_and_tree('src', format=src_fmt)
1453
 
        source_tree.lock_write()
1454
 
        self.addCleanup(source_tree.unlock)
1455
 
        tip = source_tree.commit('foo')
1456
 
        target = self.make_repository('target', format=target_fmt)
1457
 
        target.lock_write()
1458
 
        self.addCleanup(target.unlock)
1459
 
        source = source_tree.branch.repository._get_source(target._format)
1460
 
        self.orig_pack = target.pack
1461
 
        target.pack = self.log_pack
1462
 
        search = target.search_missing_revision_ids(
1463
 
            source_tree.branch.repository, tip)
1464
 
        stream = source.get_stream(search)
1465
 
        from_format = source_tree.branch.repository._format
1466
 
        sink = target._get_sink()
1467
 
        sink.insert_stream(stream, from_format, [])
1468
 
        if expect_pack_called:
1469
 
            self.assertLength(1, self.calls)
1470
 
        else:
1471
 
            self.assertLength(0, self.calls)
1472
 
 
1473
 
    def run_fetch(self, src_fmt, target_fmt, expect_pack_called):
1474
 
        self.expect_hint = expect_pack_called
1475
 
        self.calls = []
1476
 
        source_tree = self.make_branch_and_tree('src', format=src_fmt)
1477
 
        source_tree.lock_write()
1478
 
        self.addCleanup(source_tree.unlock)
1479
 
        tip = source_tree.commit('foo')
1480
 
        target = self.make_repository('target', format=target_fmt)
1481
 
        target.lock_write()
1482
 
        self.addCleanup(target.unlock)
1483
 
        source = source_tree.branch.repository
1484
 
        self.orig_pack = target.pack
1485
 
        target.pack = self.log_pack
1486
 
        target.fetch(source)
1487
 
        if expect_pack_called:
1488
 
            self.assertLength(1, self.calls)
1489
 
        else:
1490
 
            self.assertLength(0, self.calls)
1491
 
 
1492
 
    def test_sink_format_hint_no(self):
1493
 
        # When the target format says packing makes no difference, pack is not
1494
 
        # called.
1495
 
        self.run_stream('1.9', 'rich-root-pack', False)
1496
 
 
1497
 
    def test_sink_format_hint_yes(self):
1498
 
        # When the target format says packing makes a difference, pack is
1499
 
        # called.
1500
 
        self.run_stream('1.9', '2a', True)
1501
 
 
1502
 
    def test_sink_format_same_no(self):
1503
 
        # When the formats are the same, pack is not called.
1504
 
        self.run_stream('2a', '2a', False)
1505
 
 
1506
 
    def test_IDS_format_hint_no(self):
1507
 
        # When the target format says packing makes no difference, pack is not
1508
 
        # called.
1509
 
        self.run_fetch('1.9', 'rich-root-pack', False)
1510
 
 
1511
 
    def test_IDS_format_hint_yes(self):
1512
 
        # When the target format says packing makes a difference, pack is
1513
 
        # called.
1514
 
        self.run_fetch('1.9', '2a', True)
1515
 
 
1516
 
    def test_IDS_format_same_no(self):
1517
 
        # When the formats are the same, pack is not called.
1518
 
        self.run_fetch('2a', '2a', False)
 
1209
class TestGCCHKPackCollection(TestCaseWithTransport):
 
1210
 
 
1211
    def test_stream_source_to_gc(self):
 
1212
        source = self.make_repository('source', format='development6-rich-root')
 
1213
        target = self.make_repository('target', format='development6-rich-root')
 
1214
        stream = source._get_source(target._format)
 
1215
        self.assertIsInstance(stream, groupcompress_repo.GroupCHKStreamSource)
 
1216
 
 
1217
    def test_stream_source_to_non_gc(self):
 
1218
        source = self.make_repository('source', format='development6-rich-root')
 
1219
        target = self.make_repository('target', format='rich-root-pack')
 
1220
        stream = source._get_source(target._format)
 
1221
        # We don't want the child GroupCHKStreamSource
 
1222
        self.assertIs(type(stream), repository.StreamSource)
 
1223
 
 
1224
    def test_get_stream_for_missing_keys_includes_all_chk_refs(self):
 
1225
        source_builder = self.make_branch_builder('source',
 
1226
                            format='development6-rich-root')
 
1227
        # We have to build a fairly large tree, so that we are sure the chk
 
1228
        # pages will have split into multiple pages.
 
1229
        entries = [('add', ('', 'a-root-id', 'directory', None))]
 
1230
        for i in 'abcdefghijklmnopqrstuvwxyz123456789':
 
1231
            for j in 'abcdefghijklmnopqrstuvwxyz123456789':
 
1232
                fname = i + j
 
1233
                fid = fname + '-id'
 
1234
                content = 'content for %s\n' % (fname,)
 
1235
                entries.append(('add', (fname, fid, 'file', content)))
 
1236
        source_builder.start_series()
 
1237
        source_builder.build_snapshot('rev-1', None, entries)
 
1238
        # Now change a few of them, so we get a few new pages for the second
 
1239
        # revision
 
1240
        source_builder.build_snapshot('rev-2', ['rev-1'], [
 
1241
            ('modify', ('aa-id', 'new content for aa-id\n')),
 
1242
            ('modify', ('cc-id', 'new content for cc-id\n')),
 
1243
            ('modify', ('zz-id', 'new content for zz-id\n')),
 
1244
            ])
 
1245
        source_builder.finish_series()
 
1246
        source_branch = source_builder.get_branch()
 
1247
        source_branch.lock_read()
 
1248
        self.addCleanup(source_branch.unlock)
 
1249
        target = self.make_repository('target', format='development6-rich-root')
 
1250
        source = source_branch.repository._get_source(target._format)
 
1251
        self.assertIsInstance(source, groupcompress_repo.GroupCHKStreamSource)
 
1252
 
 
1253
        # On a regular pass, getting the inventories and chk pages for rev-2
 
1254
        # would only get the newly created chk pages
 
1255
        search = graph.SearchResult(set(['rev-2']), set(['rev-1']), 1,
 
1256
                                    set(['rev-2']))
 
1257
        simple_chk_records = []
 
1258
        for vf_name, substream in source.get_stream(search):
 
1259
            if vf_name == 'chk_bytes':
 
1260
                for record in substream:
 
1261
                    simple_chk_records.append(record.key)
 
1262
            else:
 
1263
                for _ in substream:
 
1264
                    continue
 
1265
        # 3 pages, the root (InternalNode), + 2 pages which actually changed
 
1266
        self.assertEqual([('sha1:91481f539e802c76542ea5e4c83ad416bf219f73',),
 
1267
                          ('sha1:4ff91971043668583985aec83f4f0ab10a907d3f',),
 
1268
                          ('sha1:81e7324507c5ca132eedaf2d8414ee4bb2226187',),
 
1269
                          ('sha1:b101b7da280596c71a4540e9a1eeba8045985ee0',)],
 
1270
                         simple_chk_records)
 
1271
        # Now, when we do a similar call using 'get_stream_for_missing_keys'
 
1272
        # we should get a much larger set of pages.
 
1273
        missing = [('inventories', 'rev-2')]
 
1274
        full_chk_records = []
 
1275
        for vf_name, substream in source.get_stream_for_missing_keys(missing):
 
1276
            if vf_name == 'inventories':
 
1277
                for record in substream:
 
1278
                    self.assertEqual(('rev-2',), record.key)
 
1279
            elif vf_name == 'chk_bytes':
 
1280
                for record in substream:
 
1281
                    full_chk_records.append(record.key)
 
1282
            else:
 
1283
                self.fail('Should not be getting a stream of %s' % (vf_name,))
 
1284
        # We have 257 records now. This is because we have 1 root page, and 256
 
1285
        # leaf pages in a complete listing.
 
1286
        self.assertEqual(257, len(full_chk_records))
 
1287
        self.assertSubset(simple_chk_records, full_chk_records)