spotterbase.test package
Submodules
spotterbase.test.mixins module
spotterbase.test.test_annotation_serialization module
- class spotterbase.test.test_annotation_serialization.TestAnnotationSerialization(methodName='runTest')
Bases:
GraphTestMixin,TestCase- converter = <spotterbase.records.jsonld_support.JsonLdRecordConverter object>
- example_json_ld_files: list[Path] = [PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/spotterbase/envs/latest/lib/python3.10/site-packages/doc/source/codesnippets/example-annotation.jsonld'), PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/spotterbase/envs/latest/lib/python3.10/site-packages/doc/source/codesnippets/example-target.jsonld')]
- fp = <_io.TextIOWrapper name='/home/docs/checkouts/readthedocs.org/user_builds/spotterbase/envs/latest/lib/python3.10/site-packages/spotterbase/resources/sb-context.jsonld' mode='r' encoding='UTF-8'>
- package_root = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/spotterbase/envs/latest/lib/python3.10/site-packages/spotterbase')
- sb_context = {'@context': {'FragmentTarget': 'https://ns.mathhub.info/project/sb/FragmentTarget', 'ListSelector': 'https://ns.mathhub.info/project/sb/ListSelector', 'MultiTagBody': 'https://ns.mathhub.info/project/sb/MultiTagBody', 'OffsetSelector': 'https://ns.mathhub.info/project/sb/OffsetSelector', 'PathSelector': 'https://ns.mathhub.info/project/sb/PathSelector', 'SimpleTagBody': 'https://ns.mathhub.info/project/sb/SimpleTagBody', 'SpotterRun': 'https://ns.mathhub.info/project/sb/SpotterRun', 'Tag': 'https://ns.mathhub.info/project/sb/Tag', 'TagSet': 'https://ns.mathhub.info/project/sb/TagSet', 'belongsTo': {'@id': 'https://ns.mathhub.info/project/sb/belongsTo', '@type': '@id'}, 'belongsTo_Rev': {'@reverse': 'belongsTo_Rev_unreversed'}, 'belongsTo_Rev_unreversed': {'@id': 'https://ns.mathhub.info/project/sb/belongsTo', '@type': '@id'}, 'comment': {'@id': 'http://www.w3.org/2000/01/rdf-schema#comment', '@type': 'http://www.w3.org/2001/XMLSchema#string'}, 'contains': {'@id': 'https://ns.mathhub.info/project/sb/contains', '@type': '@id'}, 'endPath': {'@id': 'https://ns.mathhub.info/project/sb/endPath', '@type': 'http://www.w3.org/2001/XMLSchema#string'}, 'html-value': {'@id': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#value', '@type': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML'}, 'isBasedOn': {'@id': 'https://ns.mathhub.info/project/sb/isBasedOn', '@type': '@id'}, 'license': {'@id': 'http://purl.org/dc/terms/license', '@type': '@id'}, 'sb': 'https://ns.mathhub.info/project/sb/', 'spotterVersion': {'@id': 'https://ns.mathhub.info/project/sb/spotterVersion', '@type': 'http://www.w3.org/2001/XMLSchema#string'}, 'startPath': {'@id': 'https://ns.mathhub.info/project/sb/startPath', '@type': 'http://www.w3.org/2001/XMLSchema#string'}, 'subTagOf': {'@id': 'https://ns.mathhub.info/project/sb/subTagOf', '@type': '@id'}, 'title': {'@id': 'http://purl.org/dc/terms/title', '@type': '@id'}, 'val': {'@id': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#value', '@type': '@id'}, 'vals': {'@container': '@list', '@id': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#value', '@type': '@id'}, 'withSpotter': {'@id': 'https://ns.mathhub.info/project/sb/withSpotter', '@type': '@id'}, 'year': {'@id': 'http://purl.org/dc/terms/date', '@type': 'http://www.w3.org/2001/XMLSchema#gYear'}}}
- test_jsonld_is_same_as_generated_triples()
- test_load_from_triples()
spotterbase.test.test_corpora module
spotterbase.test.test_dnm module
spotterbase.test.test_dnm_nlp module
spotterbase.test.test_documentation module
spotterbase.test.test_offset_converter module
- class spotterbase.test.test_offset_converter.TestOffsetConverter(methodName='runTest')
Bases:
TestCase- test_basic()
- test_stored_offsets()
- test_text_offsets()
- spotterbase.test.test_offset_converter.get_xpath_node(tree: _ElementTree, xpath: str) _Element
spotterbase.test.test_rangecmp module
spotterbase.test.test_rdf module
- class spotterbase.test.test_rdf.MyVocab
Bases:
Vocabulary
spotterbase.test.test_records module
- class spotterbase.test.test_records.TestPredicates
Bases:
object- edge: PredInfo = PredInfo(uri=Uri('http://example.org/sb-test#edge'), is_rdf_list=False, literal_type=None, is_reversed=False, json_ld_term='edge-in-json-ld', json_ld_type_is_id=True)
- class spotterbase.test.test_records.TestRecords(methodName='runTest')
Bases:
TestCase- test_simple()
- class spotterbase.test.test_records.TestVocab
Bases:
Vocabulary