コード例 #1
0
 def test_adding_record(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     remove_from_dicts(dicts, 92)
     process_chunk([92], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #2
0
 def test_adding_record(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     remove_from_dicts(dicts, 92)
     process_chunk([92], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #3
0
 def test_catchup(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     dicts['cites'][95].remove(77)
     dicts['refs'][77].remove(95)
     process_chunk([95], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #4
0
 def test_catchup(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     dicts['cites'][95].remove(77)
     dicts['refs'][77].remove(95)
     process_chunk([95], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #5
0
 def test_removed_cites(self):
     "test the cascading of removed cites"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     dicts['cites'].setdefault(1, []).append(3)
     dicts['cites'].setdefault(2, []).append(3)
     dicts['refs'].setdefault(3, []).extend([1, 2])
     process_chunk([1, 2], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #6
0
 def test_removed_cites(self):
     "test the cascading of removed cites"
     from invenio.bibrank_citation_indexer import process_chunk
     dicts = EXPECTED_DICTS.copy()
     dicts['cites'].setdefault(1, []).append(3)
     dicts['cites'].setdefault(2, []).append(3)
     dicts['refs'].setdefault(3, []).extend([1, 2])
     process_chunk([1, 2], CONFIG, dicts)
     compare_dicts(self, dicts)
コード例 #7
0
    def test_basic(self):
        from invenio.bibrank_citation_indexer import process_chunk
        dicts = {
            'cites_weight': {},
            'cites': {},
            'refs': {},
            'selfcites': {},
            'selfrefs': {},
            'authorcites': {},
        }

        process_chunk(range(1, 100), CONFIG, dicts)
        compare_dicts(self, dicts)
コード例 #8
0
    def test_basic(self):
        from invenio.bibrank_citation_indexer import process_chunk
        dicts = {
            'cites_weight': {},
            'cites': {},
            'refs': {},
            'selfcites': {},
            'selfrefs': {},
            'authorcites': {},
        }

        process_chunk(range(1, 100), CONFIG, dicts)
        compare_dicts(self, dicts)
 def test_adding_record(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     cites, refs = process_chunk([92], CONFIG)
     expected_cites = {}
     compare_dicts(self, cites, expected_cites)
     expected_refs = {92: [74, 91]}
     compare_dicts(self, refs, expected_refs)
コード例 #10
0
 def test_adding_record(self):
     "tests adding a record"
     from invenio.bibrank_citation_indexer import process_chunk
     cites, refs = process_chunk([92], CONFIG)
     expected_cites = {}
     compare_dicts(self, cites, expected_cites)
     expected_refs = {92: [74, 91]}
     compare_dicts(self, refs, expected_refs)
コード例 #11
0
    def test_catchup(self):
        "tests adding a record (with catchup)"
        from invenio.bibrank_citation_indexer import process_chunk
        cites, refs = process_chunk([95], CONFIG)

        expected_cites = {95: [77, 86]}
        compare_dicts(self, cites, expected_cites)
        expected_refs = {}
        compare_dicts(self, refs, expected_refs)
コード例 #12
0
    def test_catchup(self):
        "tests adding a record (with catchup)"
        from invenio.bibrank_citation_indexer import process_chunk
        cites, refs = process_chunk([95], CONFIG)

        expected_cites = {95: [77, 86]}
        compare_dicts(self, cites, expected_cites)
        expected_refs = {}
        compare_dicts(self, refs, expected_refs)
コード例 #13
0
 def test_basic(self):
     from invenio.bibrank_citation_indexer import process_chunk
     cites, refs = process_chunk(range(1, 100), CONFIG)
     compare_dicts(self, cites, EXPECTED_DICTS['cites'])
     compare_dicts(self, refs, EXPECTED_DICTS['refs'])
コード例 #14
0
 def test_basic(self):
     from invenio.bibrank_citation_indexer import process_chunk
     cites, refs = process_chunk(range(1, 100), CONFIG)
     compare_dicts(self, cites, EXPECTED_DICTS['cites'])
     compare_dicts(self, refs, EXPECTED_DICTS['refs'])