Skip to content

Merge pull request #64 from iolanta-tech/double-check-against-pyld #21

Merge pull request #64 from iolanta-tech/double-check-against-pyld

Merge pull request #64 from iolanta-tech/double-check-against-pyld #21

GitHub Actions / pytest succeeded Apr 28, 2024 in 0s

645 passed, 171 failed and 71 skipped

Tests failed

❌ tests/artifacts/pytest.xml

887 tests were completed in 43s with 645 passed, 171 failed and 71 skipped.

Test suite Passed Failed Skipped Time
pytest 645✅ 171❌ 71⚪ 43s

❌ pytest

tests.test_expand
  ✅ test_empty_value
  ❌ test_local_context
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a487340>
tests.test_specification
  ✅ test_to_rdf[toRdf-manifest#ter19]
  ❌ test_to_rdf[toRdf-manifest#tc031]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a281ea0>
  ⚪ test_expand[remote-doc-manifest#t0006]
  ✅ test_expand[expand-manifest#t0035]
  ✅ test_expand[expand-manifest#tc010]
  ✅ test_expand[remote-doc-manifest#t0004]
  ❌ test_to_rdf[toRdf-manifest#te096]
	self = <Graph identifier=N5284d633fb2a4809ae29478001da4e9e (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tc019]
  ✅ test_expand[expand-manifest#tpr12]
  ✅ test_expand[expand-manifest#t0084]
  ✅ test_expand[expand-manifest#t0107]
  ⚪ test_expand[expand-manifest#t0122]
  ✅ test_to_rdf[toRdf-manifest#te073]
  ✅ test_to_rdf[toRdf-manifest#te032]
  ❌ test_to_rdf[toRdf-manifest#te127]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3a6dd0>
  ❌ test_expand[expand-manifest#ter56]
	test_case = TestCase(test='expand-manifest#ter56', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specification...on-ld-api/tests/expand/er56-in.jsonld'), result='keyword redefinition', req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te034]
	test_case = TestCase(test='toRdf-manifest#te034', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e034-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#tc034]
  ✅ test_to_rdf[toRdf-manifest#t0024]
  ✅ test_expand[expand-manifest#tdi06]
  ❌ test_to_rdf[toRdf-manifest#te040]
	test_case = TestCase(test='toRdf-manifest#te040', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e040-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tep03]
  ✅ test_expand[expand-manifest#tpr18]
  ❌ test_to_rdf[toRdf-manifest#te097]
	self = <Graph identifier=N013e55aec23a42cc98dc7907cdc1f052 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#t0127]
	test_case = TestCase(test='toRdf-manifest#t0127', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0127-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te072]
  ✅ test_expand[expand-manifest#tm006]
  ✅ test_expand[expand-manifest#t0085]
  ✅ test_expand[html-manifest#te012]
  ✅ test_to_rdf[toRdf-manifest#te045]
  ✅ test_expand[expand-manifest#tpr03]
  ✅ test_to_rdf[toRdf-manifest#tm012]
  ✅ test_to_rdf[html-manifest#tr013]
  ✅ test_expand[expand-manifest#ter26]
  ✅ test_expand[expand-manifest#t0019]
  ⚪ test_expand[remote-doc-manifest#t0011]
  ❌ test_to_rdf[toRdf-manifest#te122]
	self = <pyld.jsonld.JsonLdProcessor object at 0x7fad7a7efca0>
  ✅ test_expand[expand-manifest#tli06]
  ✅ test_expand[expand-manifest#tpr20]
  ❌ test_to_rdf[toRdf-manifest#te099]
	self = <Graph identifier=N065047042f0b43168e47ade3050fcb21 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[basic-manifest#cr-well-formed-3-negative]
  ✅ test_to_rdf[toRdf-manifest#ter04]
  ✅ test_to_rdf[toRdf-manifest#tn006]
  ✅ test_to_rdf[toRdf-manifest#te114]
  ✅ test_to_rdf[toRdf-manifest#tc019]
  ✅ test_expand[html-manifest#te011]
  ❌ test_to_rdf[toRdf-manifest#t0120]
	test_case = TestCase(test='toRdf-manifest#t0120', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0120-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_expand[expand-manifest#ter54]
	test_case = TestCase(test='expand-manifest#ter54', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/er54-in.jsonld'), result='invalid typed value', req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te068]
  ✅ test_expand[expand-manifest#tjs03]
  ✅ test_to_rdf[toRdf-manifest#tjs05]
  ✅ test_to_rdf[toRdf-manifest#te055]
  ✅ test_expand[expand-manifest#t0067]
  ✅ test_to_rdf[toRdf-manifest#tp004]
  ✅ test_expand[basic-manifest#cir-document-content-1-negative]
  ✅ test_expand[html-manifest#te019]
  ✅ test_to_rdf[toRdf-manifest#tjs01]
  ⚪ test_expand[expand-manifest#t0111]
  ✅ test_to_rdf[toRdf-manifest#tli05]
  ❌ test_to_rdf[toRdf-manifest#ter05]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a2cd510>
  ✅ test_to_rdf[toRdf-manifest#tjs15]
  ✅ test_to_rdf[toRdf-manifest#ter50]
  ✅ test_to_rdf[toRdf-manifest#te117]
  ✅ test_expand[expand-manifest#ter12]
  ✅ test_to_rdf[toRdf-manifest#t0026]
  ✅ test_to_rdf[toRdf-manifest#tdi09]
  ⚪ test_expand[remote-doc-manifest#tla05]
  ✅ test_expand[expand-manifest#tp001]
  ✅ test_expand[expand-manifest#ten05]
  ✅ test_to_rdf[toRdf-manifest#t0015]
  ⚪ test_expand[expand-manifest#t0129]
  ✅ test_expand[expand-manifest#t0052]
  ✅ test_to_rdf[toRdf-manifest#tpr35]
  ✅ test_expand[expand-manifest#tpr28]
  ✅ test_expand[expand-manifest#tjs16]
  ✅ test_expand[expand-manifest#ter27]
  ❌ test_to_rdf[toRdf-manifest#tdi11]
	test_case = TestCase(test='toRdf-manifest#tdi11', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di11-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#t0077]
  ❌ test_to_rdf[toRdf-manifest#tm018]
	test_case = TestCase(test='toRdf-manifest#tm018', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/m018-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te107]
	self = <Graph identifier=Na0d472eec2704314beaee2009eac86bd (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#tpi06]
	test_case = TestCase(test='toRdf-manifest#tpi06', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/pi06-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tdi05]
  ❌ test_expand[remote-doc-manifest#t0012]
	test_case = TestCase(test='remote-doc-manifest#t0012', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifica...ests/remote-doc/0012-in.json'), result='multiple context link headers', req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tec01]
  ✅ test_expand[expand-manifest#t0072]
  ❌ test_to_rdf[toRdf-manifest#te083]
	self = <Graph identifier=Nb507cd2577ff4db1b8ee50621e5eacd4 (<class 'rdflib.graph.Graph'>)>
  ⚪ test_expand[remote-doc-manifest#t0003]
  ✅ test_to_rdf[toRdf-manifest#tc032]
  ⚪ test_expand[remote-doc-manifest#tla01]
  ✅ test_to_rdf[toRdf-manifest#tpr02]
  ✅ test_expand[expand-manifest#t0104]
  ❌ test_to_rdf[toRdf-manifest#te007]
	test_case = TestCase(test='toRdf-manifest#te007', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e007-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te074]
  ✅ test_to_rdf[toRdf-manifest#tpr01]
  ⚪ test_expand[expand-manifest#t0109]
  ✅ test_to_rdf[toRdf-manifest#tn001]
  ✅ test_expand[expand-manifest#t0119]
  ❌ test_to_rdf[toRdf-manifest#tdi06]
	test_case = TestCase(test='toRdf-manifest#tdi06', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di06-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tjs17]
  ✅ test_expand[expand-manifest#t0037]
  ✅ test_expand[expand-manifest#t0123]
  ❌ test_to_rdf[html-manifest#tr021]
	test_case = TestCase(test='html-manifest#tr021', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...api/tests/html/r021-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://a.example.com/doc'))
  ❌ test_to_rdf[toRdf-manifest#te109]
	test_case = TestCase(test='toRdf-manifest#te109', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e109-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tjs18]
  ❌ test_to_rdf[toRdf-manifest#te030]
	test_case = TestCase(test='toRdf-manifest#te030', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e030-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te123]
  ❌ test_to_rdf[toRdf-manifest#ter56]
	test_case = TestCase(test='toRdf-manifest#ter56', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/er56-in.jsonld'), result='keyword redefinition', req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#tpi06]
  ✅ test_expand[expand-manifest#tpr21]
  ❌ test_to_rdf[toRdf-manifest#te108]
	self = <Graph identifier=N636e0300abcf49908b4dd09773300f15 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#t0008]
  ⚪ test_expand[html-manifest#te018]
  ✅ test_expand[expand-manifest#tpr38]
  ✅ test_expand[expand-manifest#t0017]
  ✅ test_expand[expand-manifest#tm003]
  ✅ test_expand[expand-manifest#tn006]
  ✅ test_to_rdf[toRdf-manifest#tjs02]
  ✅ test_expand[expand-manifest#tc008]
  ✅ test_expand[expand-manifest#tli07]
  ✅ test_expand[expand-manifest#t0002]
  ✅ test_expand[expand-manifest#t0082]
  ✅ test_to_rdf[toRdf-manifest#tpr23]
  ✅ test_expand[expand-manifest#tin05]
  ❌ test_to_rdf[toRdf-manifest#te050]
	test_case = TestCase(test='toRdf-manifest#te050', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e050-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0046]
  ✅ test_to_rdf[toRdf-manifest#tc028]
  ✅ test_to_rdf[toRdf-manifest#tdi03]
  ⚪ test_expand[expand-manifest#tc036]
  ✅ test_to_rdf[toRdf-manifest#tjs16]
  ❌ test_to_rdf[toRdf-manifest#te066]
	test_case = TestCase(test='toRdf-manifest#te066', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e066-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpr35]
  ✅ test_expand[expand-manifest#t0053]
  ✅ test_to_rdf[toRdf-manifest#te006]
  ✅ test_expand[expand-manifest#tpr08]
  ✅ test_expand[expand-manifest#tn005]
  ✅ test_to_rdf[toRdf-manifest#t0119]
  ✅ test_to_rdf[toRdf-manifest#twf07]
  ✅ test_expand[expand-manifest#tjs11]
  ⚪ test_expand[basic-manifest#html-dedent-needed]
  ⚪ test_expand[expand-manifest#t0060]
  ✅ test_expand[remote-doc-manifest#tla04]
  ✅ test_to_rdf[toRdf-manifest#tpr31]
  ✅ test_to_rdf[toRdf-manifest#ter08]
  ❌ test_to_rdf[html-manifest#tr019]
	test_case = TestCase(test='html-manifest#tr019', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...api/tests/html/r019-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://a.example.com/doc'))
  ⚪ test_expand[expand-manifest#tin06]
  ✅ test_expand[expand-manifest#t0073]
  ✅ test_to_rdf[toRdf-manifest#ter06]
  ✅ test_expand[expand-manifest#ter41]
  ✅ test_expand[html-manifest#te006]
  ✅ test_to_rdf[toRdf-manifest#tc033]
  ✅ test_to_rdf[toRdf-manifest#tc035]
  ✅ test_expand[expand-manifest#tc022]
  ✅ test_expand[expand-manifest#t0074]
  ✅ test_to_rdf[toRdf-manifest#tpr38]
  ✅ test_expand[html-manifest#te005]
  ✅ test_expand[expand-manifest#tm001]
  ✅ test_expand[expand-manifest#tc012]
  ✅ test_expand[expand-manifest#tli10]
  ✅ test_to_rdf[toRdf-manifest#ter07]
  ✅ test_expand[expand-manifest#tpr15]
  ✅ test_expand[expand-manifest#ten03]
  ✅ test_to_rdf[toRdf-manifest#tm008]
  ✅ test_to_rdf[toRdf-manifest#ter35]
  ✅ test_to_rdf[toRdf-manifest#te024]
  ✅ test_expand[html-manifest#te007]
  ✅ test_to_rdf[toRdf-manifest#tpr10]
  ✅ test_to_rdf[toRdf-manifest#ten05]
  ✅ test_expand[expand-manifest#t0094]
  ✅ test_to_rdf[toRdf-manifest#ter10]
  ✅ test_to_rdf[toRdf-manifest#ter33]
  ❌ test_to_rdf[toRdf-manifest#tso12]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a2d5000>
  ✅ test_expand[expand-manifest#tc004]
  ❌ test_to_rdf[toRdf-manifest#te130]
	test_case = TestCase(test='toRdf-manifest#te130', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e130-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te106]
	self = <Graph identifier=Nc05b3a42833746c4a0f3e99942bb3c23 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#twf03]
  ✅ test_expand[expand-manifest#t0117]
  ✅ test_expand[expand-manifest#ter10]
  ❌ test_to_rdf[toRdf-manifest#tso11]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79da8070>
  ✅ test_to_rdf[toRdf-manifest#te052]
  ✅ test_to_rdf[toRdf-manifest#ter39]
  ✅ test_expand[expand-manifest#tpr39]
  ✅ test_expand[expand-manifest#ter13]
  ✅ test_to_rdf[toRdf-manifest#tc009]
  ❌ test_to_rdf[toRdf-manifest#ter54]
	test_case = TestCase(test='toRdf-manifest#ter54', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/er54-in.jsonld'), result='invalid typed value', req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te111]
	test_case = TestCase(test='toRdf-manifest#te111', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e111-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tm020]
  ✅ test_to_rdf[toRdf-manifest#te125]
  ✅ test_expand[expand-manifest#t0065]
  ✅ test_to_rdf[toRdf-manifest#t0009]
  ❌ test_to_rdf[toRdf-manifest#tpi10]
	test_case = TestCase(test='toRdf-manifest#tpi10', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/pi10-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te098]
	self = <Graph identifier=Na01c87449b6f47729f40a3338a9c75b5 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#t0030]
  ✅ test_to_rdf[toRdf-manifest#te015]
  ✅ test_to_rdf[toRdf-manifest#ter48]
  ✅ test_expand[expand-manifest#tjs04]
  ✅ test_expand[expand-manifest#t0068]
  ✅ test_expand[expand-manifest#tpr05]
  ✅ test_expand[expand-manifest#ter14]
  ✅ test_to_rdf[toRdf-manifest#tc011]
  ✅ test_expand[expand-manifest#tc023]
  ✅ test_expand[expand-manifest#t0120]
  ⚪ test_expand[html-manifest#te021]
  ✅ test_expand[html-manifest#te004]
  ✅ test_to_rdf[toRdf-manifest#tm007]
  ✅ test_to_rdf[toRdf-manifest#ter28]
  ⚪ test_expand[expand-manifest#tpi07]
  ⚪ test_expand[expand-manifest#t0121]
  ❌ test_to_rdf[toRdf-manifest#t0020]
	test_case = TestCase(test='toRdf-manifest#t0020', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0020-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tc014]
  ❌ test_to_rdf[toRdf-manifest#t0125]
	test_case = TestCase(test='toRdf-manifest#t0125', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0125-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0045]
  ✅ test_to_rdf[toRdf-manifest#ter12]
  ✅ test_to_rdf[html-manifest#tr001]
  ✅ test_to_rdf[toRdf-manifest#tp001]
  ✅ test_to_rdf[toRdf-manifest#tc018]
  ✅ test_to_rdf[toRdf-manifest#tpr29]
  ✅ test_to_rdf[toRdf-manifest#tm001]
  ✅ test_to_rdf[toRdf-manifest#te042]
  ❌ test_to_rdf[toRdf-manifest#te100]
	self = <Graph identifier=Ndb2416b0a5ca4223ace678148993515e (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#te094]
	self = <Graph identifier=N033e6db0e8a84d2ca6d17b5227b2e21d (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tl001]
  ✅ test_expand[expand-manifest#ten06]
  ✅ test_to_rdf[toRdf-manifest#tpr11]
  ✅ test_expand[expand-manifest#ter17]
  ✅ test_to_rdf[toRdf-manifest#te041]
  ✅ test_to_rdf[basic-manifest#cir-scalar-other-2-positive]
  ✅ test_expand[expand-manifest#tjs14]
  ✅ test_to_rdf[toRdf-manifest#tjs21]
  ✅ test_to_rdf[toRdf-manifest#tli04]
  ✅ test_to_rdf[toRdf-manifest#ter34]
  ✅ test_expand[expand-manifest#ter36]
  ✅ test_to_rdf[toRdf-manifest#te016]
  ❌ test_to_rdf[toRdf-manifest#tdi04]
	test_case = TestCase(test='toRdf-manifest#tdi04', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di04-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tin07]
  ✅ test_expand[expand-manifest#tjs10]
  ✅ test_to_rdf[toRdf-manifest#tm002]
  ❌ test_to_rdf[toRdf-manifest#t0129]
	test_case = TestCase(test='toRdf-manifest#t0129', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0129-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te004]
  ❌ test_to_rdf[toRdf-manifest#te086]
	self = <Graph identifier=Nfa54b4beee8c44399cda420c36e794f8 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#te064]
  ❌ test_to_rdf[toRdf-manifest#t0016]
	test_case = TestCase(test='toRdf-manifest#t0016', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0016-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tes02]
  ✅ test_expand[expand-manifest#t0097]
  ✅ test_to_rdf[toRdf-manifest#tpr05]
  ⚪ test_expand[expand-manifest#t0005]
  ⚪ test_expand[expand-manifest#tso05]
  ✅ test_to_rdf[toRdf-manifest#ter30]
  ✅ test_to_rdf[toRdf-manifest#tn002]
  ✅ test_expand[expand-manifest#ter51]
  ✅ test_expand[expand-manifest#tin08]
  ✅ test_expand[expand-manifest#t0093]
  ❌ test_to_rdf[html-manifest#tr017]
	test_case = TestCase(test='html-manifest#tr017', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r017-in.html'), result='invalid script element', req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#tc015]
	test_case = TestCase(test='toRdf-manifest#tc015', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/c015-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[basic-manifest#html-and-yaml-streams]
  ❌ test_to_rdf[toRdf-manifest#tdi07]
	test_case = TestCase(test='toRdf-manifest#tdi07', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di07-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#tso07]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a767790>
  ✅ test_expand[expand-manifest#t0004]
  ✅ test_expand[expand-manifest#tc033]
  ❌ test_to_rdf[toRdf-manifest#te021]
	self = <Graph identifier=Ne99f4d89527e4df2b15da90ef8e48773 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#ter25]
  ✅ test_expand[expand-manifest#tjs05]
  ❌ test_to_rdf[toRdf-manifest#t0128]
	test_case = TestCase(test='toRdf-manifest#t0128', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0128-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#ter44]
  ✅ test_expand[basic-manifest#cr-utf8-2-negative]
  ❌ test_to_rdf[toRdf-manifest#te028]
	test_case = TestCase(test='toRdf-manifest#te028', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e028-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#t0007]
  ❌ test_to_rdf[toRdf-manifest#tc038]
	test_case = TestCase(test='toRdf-manifest#tc038', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/c038-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tn004]
  ✅ test_to_rdf[toRdf-manifest#tec02]
  ❌ test_to_rdf[toRdf-manifest#te105]
	self = <Graph identifier=Nc21a6d7008b946b19766350f8a7c1528 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#t0131]
	test_case = TestCase(test='toRdf-manifest#t0131', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0131-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#ter49]
  ✅ test_to_rdf[toRdf-manifest#tc037]
  ✅ test_expand[expand-manifest#tpr09]
  ✅ test_expand[expand-manifest#tdi08]
  ✅ test_to_rdf[toRdf-manifest#tc027]
  ✅ test_to_rdf[toRdf-manifest#tc008]
  ✅ test_expand[expand-manifest#ter08]
  ✅ test_to_rdf[toRdf-manifest#te058]
  ❌ test_to_rdf[html-manifest#tr007]
	test_case = TestCase(test='html-manifest#tr007', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...l-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r007-out.nq'), req=None, extract_all_scripts=True, base=None)
  ✅ test_expand[basic-manifest#cir-mapping-key-4-negative]
  ✅ test_expand[html-manifest#te002]
  ❌ test_to_rdf[toRdf-manifest#tli14]
	test_case = TestCase(test='toRdf-manifest#tli14', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...-ld-api/tests/toRdf/li14-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example.com/'))
  ✅ test_expand[expand-manifest#ten02]
  ✅ test_to_rdf[toRdf-manifest#tpi04]
  ✅ test_to_rdf[toRdf-manifest#tpr33]
  ✅ test_to_rdf[toRdf-manifest#te119]
  ✅ test_expand[expand-manifest#tc021]
  ✅ test_expand[expand-manifest#tjs20]
  ✅ test_expand[expand-manifest#ter53]
  ✅ test_expand[expand-manifest#tjs22]
  ❌ test_to_rdf[toRdf-manifest#tso10]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a299690>
  ✅ test_expand[expand-manifest#tjs08]
  ✅ test_expand[expand-manifest#ter07]
  ✅ test_to_rdf[toRdf-manifest#tpr04]
  ✅ test_to_rdf[toRdf-manifest#tpr36]
  ✅ test_to_rdf[toRdf-manifest#tpr32]
  ❌ test_expand[expand-manifest#ter05]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79dc2380>
  ✅ test_expand[remote-doc-manifest#tla03]
  ❌ test_to_rdf[toRdf-manifest#te089]
	test_case = TestCase(test='toRdf-manifest#te089', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld-api/tests/toRdf/e089-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example/base/'))
  ✅ test_expand[expand-manifest#tli09]
  ❌ test_to_rdf[toRdf-manifest#tm013]
	self = <Graph identifier=N9e086989dd1f47aaa3103f385c3a83c0 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#ter20]
  ✅ test_expand[expand-manifest#t0070]
  ✅ test_to_rdf[toRdf-manifest#tpr13]
  ✅ test_expand[expand-manifest#tpr06]
  ✅ test_expand[expand-manifest#t0007]
  ✅ test_to_rdf[toRdf-manifest#tec01]
  ✅ test_expand[basic-manifest#cir-mapping-key-3-negative]
  ✅ test_expand[expand-manifest#tpr24]
  ❌ test_to_rdf[toRdf-manifest#t0122]
	test_case = TestCase(test='toRdf-manifest#t0122', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0122-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te020]
	self = <Graph identifier=Ndd78bfd0a56044a1a769bc3cca2f4005 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[html-manifest#tex01]
  ✅ test_to_rdf[toRdf-manifest#ter53]
  ✅ test_expand[expand-manifest#ter43]
  ❌ test_to_rdf[toRdf-manifest#tdi12]
	test_case = TestCase(test='toRdf-manifest#tdi12', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di12-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpr34]
  ✅ test_expand[expand-manifest#tpr02]
  ❌ test_to_rdf[toRdf-manifest#te076]
	test_case = TestCase(test='toRdf-manifest#te076', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld-api/tests/toRdf/e076-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example/base/'))
  ❌ test_to_rdf[toRdf-manifest#t0115]
	self = <Graph identifier=N9d810cba21794060b2ae66b6301514b4 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#te102]
	self = <Graph identifier=Ne0ac145778e749b691195d77f9714a7f (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tin02]
  ✅ test_to_rdf[toRdf-manifest#t0010]
  ⚪ test_expand[expand-manifest#t0062]
  ✅ test_to_rdf[toRdf-manifest#ter31]
  ✅ test_to_rdf[toRdf-manifest#te049]
  ✅ test_to_rdf[toRdf-manifest#te054]
  ✅ test_to_rdf[toRdf-manifest#ter27]
  ✅ test_expand[expand-manifest#tso02]
  ✅ test_to_rdf[toRdf-manifest#tc012]
  ✅ test_to_rdf[toRdf-manifest#t0032]
  ❌ test_to_rdf[html-manifest#tr020]
	test_case = TestCase(test='html-manifest#tr020', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...api/tests/html/r020-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://a.example.com/doc'))
  ✅ test_to_rdf[toRdf-manifest#tn003]
  ❌ test_to_rdf[toRdf-manifest#te035]
	test_case = TestCase(test='toRdf-manifest#te035', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e035-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpr32]
  ✅ test_expand[expand-manifest#t0096]
  ⚪ test_expand[expand-manifest#t0127]
  ✅ test_expand[expand-manifest#t0011]
  ✅ test_expand[expand-manifest#tpr27]
  ✅ test_expand[expand-manifest#tc020]
  ✅ test_expand[expand-manifest#t0022]
  ✅ test_expand[expand-manifest#tep03]
  ✅ test_expand[expand-manifest#t0055]
  ✅ test_to_rdf[toRdf-manifest#te053]
  ✅ test_expand[expand-manifest#tc017]
  ❌ test_to_rdf[toRdf-manifest#tli13]
	test_case = TestCase(test='toRdf-manifest#tli13', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...-ld-api/tests/toRdf/li13-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example.com/'))
  ⚪ test_expand[expand-manifest#tpi08]
  ✅ test_to_rdf[toRdf-manifest#te070]
  ✅ test_to_rdf[toRdf-manifest#tdi01]
  ✅ test_to_rdf[toRdf-manifest#tpi05]
  ✅ test_to_rdf[html-manifest#tr014]
  ✅ test_to_rdf[toRdf-manifest#ter52]
  ✅ test_expand[expand-manifest#tc007]
  ✅ test_expand[expand-manifest#ter29]
  ✅ test_expand[basic-manifest#cir-mapping-key-1-negative]
  ❌ test_to_rdf[toRdf-manifest#t0130]
	test_case = TestCase(test='toRdf-manifest#t0130', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0130-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#ter23]
  ✅ test_to_rdf[toRdf-manifest#tdi02]
  ✅ test_expand[expand-manifest#ter18]
  ✅ test_expand[expand-manifest#tc001]
  ✅ test_to_rdf[toRdf-manifest#t0012]
  ⚪ test_expand[expand-manifest#tso08]
  ❌ test_expand[expand-manifest#tso12]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79db8190>
  ❌ test_to_rdf[toRdf-manifest#te002]
	test_case = TestCase(test='toRdf-manifest#te002', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e002-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#t0113]
	self = <Graph identifier=N007692ffe9304853849a23edda9818c2 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#twf01]
  ❌ test_to_rdf[toRdf-manifest#tc034]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a93b610>
  ✅ test_to_rdf[toRdf-manifest#te019]
  ✅ test_to_rdf[toRdf-manifest#tp002]
  ✅ test_to_rdf[toRdf-manifest#tm020]
  ✅ test_to_rdf[toRdf-manifest#ter41]
  ✅ test_to_rdf[toRdf-manifest#te017]
  ✅ test_expand[expand-manifest#ter11]
  ❌ test_to_rdf[toRdf-manifest#te126]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3a6050>
  ✅ test_to_rdf[toRdf-manifest#tjs12]
  ✅ test_to_rdf[toRdf-manifest#tso02]
  ✅ test_expand[expand-manifest#ter04]
  ✅ test_expand[expand-manifest#tpr17]
  ✅ test_to_rdf[toRdf-manifest#tpi03]
  ❌ test_to_rdf[toRdf-manifest#t0027]
	self = <Graph identifier=N709510366ff34d60a413b9d9f42b7333 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#te078]
	test_case = TestCase(test='toRdf-manifest#te078', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e078-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tc002]
  ⚪ test_expand[remote-doc-manifest#t0013]
  ✅ test_expand[basic-manifest#aa-cycles-3-positive]
  ✅ test_expand[expand-manifest#t0106]
  ✅ test_expand[expand-manifest#ter38]
  ✅ test_expand[expand-manifest#tpr37]
  ✅ test_expand[expand-manifest#tc011]
  ❌ test_expand[expand-manifest#tso13]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a75a050>
  ❌ test_to_rdf[toRdf-manifest#tm016]
	self = <Graph identifier=N5283a6e469e243d1bd60fbf09f68ad3b (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tc014]
  ✅ test_to_rdf[toRdf-manifest#tjs08]
  ✅ test_expand[expand-manifest#tm002]
  ❌ test_to_rdf[toRdf-manifest#t0123]
	test_case = TestCase(test='toRdf-manifest#t0123', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0123-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te081]
	self = <Graph identifier=Ne770cb8889ac4dc6a4b58f04e6744cb3 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tc017]
  ✅ test_expand[expand-manifest#t0087]
  ✅ test_to_rdf[toRdf-manifest#tpr34]
  ❌ test_to_rdf[toRdf-manifest#te110]
	test_case = TestCase(test='toRdf-manifest#te110', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e110-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#ter35]
  ✅ test_expand[basic-manifest#cir-scalar-other-1-positive]
  ✅ test_to_rdf[toRdf-manifest#tin04]
  ❌ test_to_rdf[toRdf-manifest#tjs13]
	test_case = TestCase(test='toRdf-manifest#tjs13', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/js13-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0061]
  ⚪ test_expand[remote-doc-manifest#t0007]
  ⚪ test_expand[remote-doc-manifest#t0010]
  ✅ test_expand[expand-manifest#tm011]
  ✅ test_to_rdf[toRdf-manifest#ten01]
  ✅ test_expand[expand-manifest#t0001]
  ✅ test_to_rdf[toRdf-manifest#tc004]
  ✅ test_expand[expand-manifest#t0018]
  ✅ test_to_rdf[toRdf-manifest#tpr42]
  ✅ test_expand[expand-manifest#t0006]
  ❌ test_to_rdf[toRdf-manifest#te104]
	self = <Graph identifier=N0fe13ee54b054adb8aa3ff2a52d2ebd6 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[basic-manifest#cir-mapping-key-5-negative]
  ❌ test_to_rdf[toRdf-manifest#te051]
	test_case = TestCase(test='toRdf-manifest#te051', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e051-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#t0006]
	test_case = TestCase(test='toRdf-manifest#t0006', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0006-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#ten06]
  ✅ test_expand[expand-manifest#tpr23]
  ✅ test_expand[expand-manifest#tn001]
  ⚪ test_expand[expand-manifest#t0050]
  ✅ test_to_rdf[toRdf-manifest#t0033]
  ✅ test_expand[expand-manifest#tin01]
  ✅ test_to_rdf[toRdf-manifest#ttn02]
  ✅ test_expand[expand-manifest#ter30]
  ✅ test_to_rdf[toRdf-manifest#tpr03]
  ✅ test_expand[expand-manifest#tjs01]
  ✅ test_expand[expand-manifest#tpr36]
  ✅ test_expand[expand-manifest#tc005]
  ✅ test_expand[expand-manifest#tjs02]
  ✅ test_to_rdf[toRdf-manifest#tpr19]
  ✅ test_expand[expand-manifest#tpr31]
  ✅ test_expand[expand-manifest#t0076]
  ✅ test_expand[expand-manifest#ter55]
  ✅ test_to_rdf[toRdf-manifest#tpr40]
  ✅ test_expand[html-manifest#te013]
  ⚪ test_expand[remote-doc-manifest#t0001]
  ⚪ test_expand[expand-manifest#tpi11]
  ✅ test_to_rdf[toRdf-manifest#tin03]
  ✅ test_expand[expand-manifest#tm016]
  ✅ test_expand[expand-manifest#t0081]
  ✅ test_to_rdf[toRdf-manifest#tpr08]
  ✅ test_expand[expand-manifest#tec02]
  ✅ test_to_rdf[toRdf-manifest#ter01]
  ✅ test_to_rdf[toRdf-manifest#tc005]
  ✅ test_to_rdf[toRdf-manifest#tc010]
  ✅ test_to_rdf[toRdf-manifest#t0031]
  ✅ test_expand[basic-manifest#cr-comments-1-positive]
  ✅ test_expand[expand-manifest#tm009]
  ✅ test_to_rdf[toRdf-manifest#t0001]
  ✅ test_to_rdf[toRdf-manifest#tin09]
  ❌ test_to_rdf[toRdf-manifest#t0121]
	test_case = TestCase(test='toRdf-manifest#t0121', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0121-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tjs04]
  ✅ test_expand[basic-manifest#two-documents-from-stream]
  ✅ test_expand[remote-doc-manifest#tla02]
  ✅ test_expand[expand-manifest#tm004]
  ✅ test_to_rdf[toRdf-manifest#tpr27]
  ✅ test_to_rdf[toRdf-manifest#tc003]
  ✅ test_to_rdf[toRdf-manifest#te023]
  ✅ test_expand[expand-manifest#t0086]
  ❌ test_to_rdf[toRdf-manifest#tm010]
	test_case = TestCase(test='toRdf-manifest#tm010', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/m010-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te061]
  ✅ test_to_rdf[toRdf-manifest#tli09]
  ❌ test_to_rdf[toRdf-manifest#te128]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a272c50>
  ⚪ test_expand[html-manifest#te022]
  ✅ test_expand[expand-manifest#ter48]
  ✅ test_expand[expand-manifest#tjs19]
  ❌ test_to_rdf[toRdf-manifest#tso09]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79b45f00>
  ✅ test_expand[expand-manifest#t0103]
  ✅ test_expand[expand-manifest#tpr01]
  ⚪ test_expand[expand-manifest#t0048]
  ✅ test_to_rdf[toRdf-manifest#tjs19]
  ❌ test_to_rdf[toRdf-manifest#tm015]
	self = <Graph identifier=N508a2257ba604900a2b9c9de78480b06 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tin03]
  ⚪ test_expand[remote-doc-manifest#t0009]
  ✅ test_expand[expand-manifest#t0124]
  ✅ test_expand[expand-manifest#tdi03]
  ✅ test_expand[expand-manifest#tjs12]
  ✅ test_expand[expand-manifest#tc025]
  ✅ test_expand[expand-manifest#t0033]
  ✅ test_to_rdf[toRdf-manifest#trt01]
  ❌ test_to_rdf[toRdf-manifest#te088]
	test_case = TestCase(test='toRdf-manifest#te088', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e088-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0024]
  ❌ test_to_rdf[html-manifest#tr005]
	test_case = TestCase(test='html-manifest#tr005', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...l-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r005-out.nq'), req=None, extract_all_scripts=True, base=None)
  ⚪ test_expand[remote-doc-manifest#t0005]
  ⚪ test_expand[expand-manifest#tm018]
  ✅ test_to_rdf[toRdf-manifest#te033]
  ❌ test_to_rdf[toRdf-manifest#te060]
	test_case = TestCase(test='toRdf-manifest#te060', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e060-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[html-manifest#tr004]
	self = <Graph identifier=N799b1d3b0c5944bab0a8373e4bcf1fd6 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tc013]
  ✅ test_to_rdf[toRdf-manifest#tc021]
  ✅ test_expand[expand-manifest#tp003]
  ✅ test_expand[expand-manifest#t0102]
  ✅ test_expand[basic-manifest#cr-well-formed-2-negative]
  ✅ test_expand[expand-manifest#tc013]
  ⚪ test_expand[expand-manifest#tc031]
  ✅ test_expand[expand-manifest#ter28]
  ✅ test_expand[expand-manifest#tjs23]
  ❌ test_to_rdf[toRdf-manifest#te077]
	test_case = TestCase(test='toRdf-manifest#te077', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e077-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0039]
  ✅ test_to_rdf[toRdf-manifest#t0013]
  ✅ test_expand[basic-manifest#aa-cycles-1-positive]
  ✅ test_expand[expand-manifest#tpr11]
  ✅ test_to_rdf[toRdf-manifest#te120]
  ✅ test_expand[expand-manifest#tjs21]
  ✅ test_expand[expand-manifest#t0080]
  ⚪ test_expand[basic-manifest#html-dedent-not-needed]
  ✅ test_expand[expand-manifest#t0023]
  ✅ test_to_rdf[toRdf-manifest#tjs11]
  ✅ test_expand[expand-manifest#tjs07]
  ✅ test_expand[expand-manifest#tpr10]
  ✅ test_expand[expand-manifest#t0034]
  ⚪ test_expand[remote-doc-manifest#t0002]
  ✅ test_expand[expand-manifest#ter52]
  ✅ test_to_rdf[toRdf-manifest#tjs22]
  ✅ test_to_rdf[toRdf-manifest#te118]
  ✅ test_expand[expand-manifest#tc030]
  ✅ test_to_rdf[toRdf-manifest#tli10]
  ✅ test_expand[expand-manifest#tm010]
  ⚪ test_expand[expand-manifest#t0092]
  ✅ test_expand[expand-manifest#ter19]
  ✅ test_expand[expand-manifest#tpr14]
  ✅ test_expand[html-manifest#te010]
  ✅ test_to_rdf[toRdf-manifest#ter36]
  ❌ test_to_rdf[toRdf-manifest#t0116]
	self = <Graph identifier=N3da724c9ee0b4423838cb4544b1a31b8 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#t0118]
  ✅ test_expand[expand-manifest#tjs09]
  ⚪ test_expand[expand-manifest#tc038]
  ✅ test_to_rdf[toRdf-manifest#tc030]
  ✅ test_expand[expand-manifest#tc035]
  ✅ test_to_rdf[toRdf-manifest#tpr14]
  ✅ test_expand[expand-manifest#tli02]
  ✅ test_to_rdf[toRdf-manifest#ter37]
  ✅ test_to_rdf[toRdf-manifest#tpr26]
  ✅ test_expand[expand-manifest#tm012]
  ✅ test_expand[expand-manifest#tc026]
  ✅ test_expand[expand-manifest#tli08]
  ✅ test_expand[expand-manifest#t0021]
  ✅ test_expand[expand-manifest#tn008]
  ✅ test_to_rdf[toRdf-manifest#tem01]
  ❌ test_to_rdf[toRdf-manifest#te093]
	self = <Graph identifier=Ndd5c0c95719e4001822492333abef9c1 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tli04]
  ✅ test_expand[expand-manifest#t0095]
  ✅ test_expand[expand-manifest#tc009]
  ❌ test_to_rdf[html-manifest#tr018]
	test_case = TestCase(test='html-manifest#tr018', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r018-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#t0057]
  ✅ test_expand[expand-manifest#t0091]
  ✅ test_expand[expand-manifest#ter20]
  ✅ test_to_rdf[toRdf-manifest#tm019]
  ✅ test_expand[expand-manifest#ter15]
  ✅ test_to_rdf[toRdf-manifest#tc023]
  ✅ test_expand[expand-manifest#t0032]
  ⚪ test_expand[expand-manifest#t0130]
  ✅ test_expand[expand-manifest#tpr30]
  ✅ test_to_rdf[toRdf-manifest#tpr09]
  ✅ test_expand[expand-manifest#tin04]
  ✅ test_expand[expand-manifest#t0008]
  ⚪ test_expand[expand-manifest#tc015]
  ❌ test_to_rdf[toRdf-manifest#tpi09]
	test_case = TestCase(test='toRdf-manifest#tpi09', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/pi09-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#tm005]
	test_case = TestCase(test='toRdf-manifest#tm005', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...-ld-api/tests/toRdf/m005-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example.org/'))
  ❌ test_to_rdf[toRdf-manifest#te121]
	test_case = TestCase(test='toRdf-manifest#te121', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e121-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#t0051]
  ✅ test_expand[expand-manifest#tc006]
  ✅ test_expand[expand-manifest#ter34]
  ✅ test_expand[expand-manifest#tpr22]
  ✅ test_to_rdf[toRdf-manifest#tpr39]
  ✅ test_expand[expand-manifest#ter31]
  ✅ test_expand[expand-manifest#t0098]
  ✅ test_to_rdf[toRdf-manifest#ter26]
  ✅ test_expand[html-manifest#te003]
  ✅ test_to_rdf[toRdf-manifest#t0019]
  ❌ test_to_rdf[toRdf-manifest#te029]
	test_case = TestCase(test='toRdf-manifest#te029', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e029-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tpr24]
  ❌ test_to_rdf[toRdf-manifest#te005]
	test_case = TestCase(test='toRdf-manifest#te005', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e005-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tli07]
  ✅ test_expand[expand-manifest#ter37]
  ✅ test_expand[expand-manifest#tpr43]
  ✅ test_to_rdf[toRdf-manifest#t0023]
  ✅ test_to_rdf[toRdf-manifest#te009]
  ✅ test_expand[expand-manifest#t0125]
  ❌ test_to_rdf[toRdf-manifest#te062]
	test_case = TestCase(test='toRdf-manifest#te062', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e062-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te059]
	test_case = TestCase(test='toRdf-manifest#te059', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e059-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0058]
  ❌ test_to_rdf[toRdf-manifest#tm014]
	self = <Graph identifier=N740371b12c1e47a7b077e04bf77df777 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tpr26]
  ✅ test_to_rdf[toRdf-manifest#tli02]
  ✅ test_expand[expand-manifest#t0009]
  ✅ test_to_rdf[toRdf-manifest#tjs14]
  ❌ test_to_rdf[toRdf-manifest#te112]
	test_case = TestCase(test='toRdf-manifest#te112', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e112-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te082]
	self = <Graph identifier=Nf9b702221b8b428ab4212da34e376b0f (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[html-manifest#te016]
  ❌ test_to_rdf[toRdf-manifest#t0018]
	test_case = TestCase(test='toRdf-manifest#t0018', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0018-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0063]
  ❌ test_to_rdf[toRdf-manifest#t0017]
	test_case = TestCase(test='toRdf-manifest#t0017', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0017-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te080]
	self = <Graph identifier=N42f05531a979473d88649abc74f8eb36 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#te090]
	test_case = TestCase(test='toRdf-manifest#te090', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld-api/tests/toRdf/e090-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example/base/'))
  ❌ test_to_rdf[toRdf-manifest#tc024]
	test_case = TestCase(test='toRdf-manifest#tc024', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/c024-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tpr20]
  ✅ test_expand[expand-manifest#t0105]
  ❌ test_to_rdf[toRdf-manifest#te101]
	self = <Graph identifier=N37b2b7ba92a54ca2a20a10fe2c2c20db (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tpr13]
  ❌ test_to_rdf[toRdf-manifest#te085]
	self = <Graph identifier=N2032218ac55245d397c1400a3952b6d2 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#te091]
	test_case = TestCase(test='toRdf-manifest#te091', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld-api/tests/toRdf/e091-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example/base/'))
  ✅ test_to_rdf[toRdf-manifest#te113]
  ✅ test_expand[expand-manifest#tc016]
  ❌ test_to_rdf[toRdf-manifest#t0028]
	self = <Graph identifier=Ndc216b4574434f7eb625d2c57a2662d1 (<class 'rdflib.graph.Graph'>)>
  ⚪ test_expand[expand-manifest#t0078]
  ✅ test_expand[expand-manifest#tc003]
  ✅ test_to_rdf[toRdf-manifest#tpr17]
  ❌ test_expand[expand-manifest#tso10]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3b5750>
  ✅ test_expand[expand-manifest#t0031]
  ⚪ test_expand[expand-manifest#t0131]
  ✅ test_expand[expand-manifest#tm015]
  ✅ test_to_rdf[toRdf-manifest#t0133]
  ✅ test_expand[expand-manifest#tdi04]
  ⚪ test_expand[expand-manifest#tso09]
  ✅ test_expand[expand-manifest#tm008]
  ✅ test_to_rdf[toRdf-manifest#tli03]
  ✅ test_to_rdf[toRdf-manifest#te039]
  ✅ test_to_rdf[toRdf-manifest#tdi08]
  ❌ test_to_rdf[toRdf-manifest#tso06]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad797fedd0>
  ✅ test_expand[html-manifest#te001]
  ❌ test_to_rdf[toRdf-manifest#te103]
	self = <Graph identifier=Neeb62d1eab1a4db291231a70052ded81 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tli06]
  ✅ test_to_rdf[toRdf-manifest#ter09]
  ⚪ test_expand[expand-manifest#t0028]
  ✅ test_to_rdf[toRdf-manifest#te043]
  ✅ test_to_rdf[toRdf-manifest#tli08]
  ✅ test_expand[expand-manifest#tpr04]
  ✅ test_expand[expand-manifest#t0100]
  ✅ test_expand[expand-manifest#ter06]
  ❌ test_to_rdf[toRdf-manifest#te092]
	test_case = TestCase(test='toRdf-manifest#te092', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e092-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#te010]
	test_case = TestCase(test='toRdf-manifest#te010', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e010-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpr42]
  ⚪ test_expand[expand-manifest#t0056]
  ⚪ test_expand[expand-manifest#t0128]
  ✅ test_expand[expand-manifest#tc032]
  ✅ test_expand[expand-manifest#ter33]
  ✅ test_to_rdf[toRdf-manifest#tm004]
  ⚪ test_expand[expand-manifest#t0088]
  ✅ test_to_rdf[toRdf-manifest#ten03]
  ✅ test_expand[basic-manifest#aa-cycles-2-negative]
  ✅ test_expand[basic-manifest#cir-scalar-core-1-positive]
  ✅ test_to_rdf[toRdf-manifest#tjs17]
  ✅ test_to_rdf[toRdf-manifest#ter38]
  ✅ test_expand[expand-manifest#t0010]
  ✅ test_expand[expand-manifest#ter40]
  ✅ test_expand[expand-manifest#t0036]
  ✅ test_expand[expand-manifest#tdi09]
  ✅ test_expand[expand-manifest#tin07]
  ✅ test_to_rdf[html-manifest#tr002]
  ⚪ test_expand[expand-manifest#t0126]
  ✅ test_expand[expand-manifest#tin09]
  ❌ test_to_rdf[toRdf-manifest#t0030]
	self = <Graph identifier=Nd66c2b99b66a40ceafe830c7875b537e (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#t0013]
  ✅ test_expand[expand-manifest#t0054]
  ✅ test_expand[expand-manifest#ter50]
  ✅ test_to_rdf[toRdf-manifest#tpr22]
  ❌ test_to_rdf[toRdf-manifest#tdi05]
	test_case = TestCase(test='toRdf-manifest#tdi05', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/di05-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tjs07]
  ❌ test_to_rdf[toRdf-manifest#tpi07]
	test_case = TestCase(test='toRdf-manifest#tpi07', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/pi07-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpr40]
  ✅ test_expand[expand-manifest#tdi07]
  ❌ test_to_rdf[html-manifest#tr006]
	test_case = TestCase(test='html-manifest#tr006', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r006-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#twf04]
  ✅ test_expand[expand-manifest#t0083]
  ✅ test_expand[expand-manifest#t0042]
  ✅ test_to_rdf[html-manifest#tr011]
  ✅ test_to_rdf[toRdf-manifest#ter51]
  ⚪ test_expand[expand-manifest#t0029]
  ❌ test_to_rdf[toRdf-manifest#tso08]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a196680>
  ✅ test_expand[expand-manifest#t0090]
  ✅ test_expand[expand-manifest#tm005]
  ✅ test_to_rdf[toRdf-manifest#t0005]
  ✅ test_expand[expand-manifest#tp002]
  ⚪ test_expand[expand-manifest#tc024]
  ❌ test_to_rdf[toRdf-manifest#tli12]
	test_case = TestCase(test='toRdf-manifest#tli12', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/li12-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#t0110]
  ❌ test_to_rdf[toRdf-manifest#tc036]
	test_case = TestCase(test='toRdf-manifest#tc036', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/c036-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tli01]
  ✅ test_to_rdf[toRdf-manifest#ter29]
  ❌ test_to_rdf[toRdf-manifest#te008]
	test_case = TestCase(test='toRdf-manifest#te008', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e008-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#ten01]
  ✅ test_to_rdf[toRdf-manifest#tjs10]
  ⚪ test_expand[html-manifest#te020]
  ❌ test_to_rdf[toRdf-manifest#tm009]
	test_case = TestCase(test='toRdf-manifest#tm009', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/m009-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tjs06]
  ✅ test_to_rdf[toRdf-manifest#tjs06]
  ✅ test_expand[expand-manifest#tn002]
  ✅ test_to_rdf[toRdf-manifest#te012]
  ✅ test_to_rdf[toRdf-manifest#t0004]
  ✅ test_to_rdf[toRdf-manifest#te067]
  ❌ test_to_rdf[toRdf-manifest#tli11]
	test_case = TestCase(test='toRdf-manifest#tli11', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...-ld-api/tests/toRdf/li11-out.nq'), req=None, extract_all_scripts=False, base=rdflib.term.URIRef('http://example.com/'))
  ✅ test_to_rdf[toRdf-manifest#ter25]
  ✅ test_expand[expand-manifest#t0041]
  ✅ test_to_rdf[toRdf-manifest#tdi10]
  ❌ test_expand[html-manifest#te017]
	test_case = TestCase(test='html-manifest#te017', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/html/e017-in.html'), result='invalid script element', req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#t0002]
  ✅ test_expand[basic-manifest#cir-mapping-key-2-negative]
  ✅ test_expand[expand-manifest#t0047]
  ✅ test_to_rdf[toRdf-manifest#te011]
  ✅ test_expand[expand-manifest#ter01]
  ❌ test_to_rdf[toRdf-manifest#te048]
	test_case = TestCase(test='toRdf-manifest#te048', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e048-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#t0114]
	self = <Graph identifier=Nf4f801fe7e9246c1add7c205c3778d84 (<class 'rdflib.graph.Graph'>)>
  ❌ test_to_rdf[toRdf-manifest#tc025]
	self = <Graph identifier=N64744bac419644afa7334ce7b5adeb80 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tn007]
  ❌ test_to_rdf[toRdf-manifest#te057]
	test_case = TestCase(test='toRdf-manifest#te057', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e057-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tc027]
  ❌ test_expand[expand-manifest#tso03]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79da8130>
  ✅ test_to_rdf[toRdf-manifest#twf02]
  ✅ test_to_rdf[toRdf-manifest#ter40]
  ⚪ test_expand[remote-doc-manifest#t0008]
  ❌ test_to_rdf[toRdf-manifest#t0117]
	self = <Graph identifier=Nbdf5ce974d6c48e1a283a6aafdf811c8 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#t0034]
  ✅ test_expand[expand-manifest#t0012]
  ✅ test_to_rdf[toRdf-manifest#t0003]
  ✅ test_expand[expand-manifest#t0108]
  ✅ test_expand[expand-manifest#tpr25]
  ✅ test_to_rdf[toRdf-manifest#ter18]
  ✅ test_expand[expand-manifest#ttn02]
  ❌ test_to_rdf[toRdf-manifest#te027]
	test_case = TestCase(test='toRdf-manifest#te027', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e027-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tpr16]
  ✅ test_to_rdf[toRdf-manifest#ter11]
  ❌ test_to_rdf[toRdf-manifest#tso05]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79b44be0>
  ✅ test_expand[expand-manifest#tpi04]
  ✅ test_expand[expand-manifest#t0016]
  ✅ test_expand[expand-manifest#ten04]
  ✅ test_to_rdf[toRdf-manifest#t0025]
  ⚪ test_expand[expand-manifest#t0059]
  ✅ test_to_rdf[toRdf-manifest#tpi02]
  ✅ test_to_rdf[toRdf-manifest#ten04]
  ✅ test_to_rdf[html-manifest#tr016]
  ✅ test_expand[basic-manifest#cir-scalar-i18n-1-positive]
  ❌ test_to_rdf[toRdf-manifest#te129]
	test_case = TestCase(test='toRdf-manifest#te129', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e129-out.nq'), req=None, extract_all_scripts=False, base=None)
  ❌ test_to_rdf[toRdf-manifest#t0124]
	test_case = TestCase(test='toRdf-manifest#t0124', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0124-out.nq'), req=None, extract_all_scripts=False, base=None)
  ⚪ test_expand[expand-manifest#tm017]
  ✅ test_to_rdf[toRdf-manifest#tpr12]
  ❌ test_to_rdf[toRdf-manifest#tpi11]
	self = <Graph identifier=N1cab44800ec34f80913c25e4bf57847f (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#tpr41]
  ✅ test_expand[expand-manifest#t0015]
  ✅ test_expand[expand-manifest#t0044]
  ✅ test_expand[html-manifest#te015]
  ✅ test_to_rdf[toRdf-manifest#tc026]
  ✅ test_expand[expand-manifest#tli03]
  ✅ test_to_rdf[html-manifest#tr010]
  ✅ test_to_rdf[toRdf-manifest#tjs03]
  ✅ test_to_rdf[toRdf-manifest#tc001]
  ✅ test_expand[expand-manifest#tdi01]
  ✅ test_to_rdf[toRdf-manifest#t0035]
  ⚪ test_expand[expand-manifest#tso11]
  ⚪ test_expand[expand-manifest#t0112]
  ✅ test_expand[expand-manifest#tm014]
  ✅ test_to_rdf[toRdf-manifest#te046]
  ✅ test_to_rdf[toRdf-manifest#te124]
  ✅ test_to_rdf[toRdf-manifest#t0014]
  ✅ test_to_rdf[toRdf-manifest#tc016]
  ✅ test_to_rdf[toRdf-manifest#tin08]
  ✅ test_expand[expand-manifest#t0114]
  ✅ test_expand[expand-manifest#tli05]
  ✅ test_expand[expand-manifest#ter23]
  ✅ test_expand[expand-manifest#tin02]
  ✅ test_to_rdf[toRdf-manifest#ter14]
  ✅ test_to_rdf[toRdf-manifest#tn004]
  ❌ test_to_rdf[toRdf-manifest#te018]
	test_case = TestCase(test='toRdf-manifest#te018', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e018-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#te063]
  ✅ test_to_rdf[toRdf-manifest#te003]
  ✅ test_to_rdf[toRdf-manifest#tm006]
  ✅ test_expand[expand-manifest#tm007]
  ❌ test_to_rdf[toRdf-manifest#t0029]
	self = <Graph identifier=Nd63768f2e59a4dac932feefae1561890 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#ter13]
  ❌ test_to_rdf[toRdf-manifest#tpr25]
	self = <Graph identifier=N7a6c5e035eac471c8dce6a8c5dd9a945 (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#te037]
  ✅ test_to_rdf[toRdf-manifest#tc020]
  ✅ test_expand[expand-manifest#t0113]
  ✅ test_to_rdf[toRdf-manifest#tpr18]
  ✅ test_to_rdf[toRdf-manifest#te022]
  ✅ test_expand[expand-manifest#t0064]
  ✅ test_expand[expand-manifest#ter49]
  ✅ test_expand[expand-manifest#tpi02]
  ❌ test_to_rdf[toRdf-manifest#te013]
	test_case = TestCase(test='toRdf-manifest#te013', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e013-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tn007]
  ✅ test_expand[expand-manifest#ter22]
  ✅ test_expand[expand-manifest#tm013]
  ❌ test_expand[expand-manifest#tso07]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad7a195cc0>
  ✅ test_expand[expand-manifest#tjs13]
  ✅ test_to_rdf[toRdf-manifest#tm003]
  ✅ test_to_rdf[toRdf-manifest#t0011]
  ✅ test_to_rdf[toRdf-manifest#tpr30]
  ✅ test_to_rdf[toRdf-manifest#ten02]
  ✅ test_to_rdf[toRdf-manifest#tpr28]
  ❌ test_to_rdf[html-manifest#tr003]
	test_case = TestCase(test='html-manifest#tr003', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r003-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0101]
  ✅ test_expand[expand-manifest#t0020]
  ✅ test_to_rdf[toRdf-manifest#tin05]
  ✅ test_to_rdf[toRdf-manifest#tc022]
  ✅ test_to_rdf[toRdf-manifest#ter15]
  ✅ test_expand[basic-manifest#cr-well-formed-1-positive]
  ❌ test_to_rdf[toRdf-manifest#te079]
	self = <Graph identifier=N58c21ca0b29f4885a9ddb85d4fdede03 (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tpr19]
  ❌ test_to_rdf[toRdf-manifest#tin06]
	test_case = TestCase(test='toRdf-manifest#tin06', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/in06-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#tpi03]
  ✅ test_expand[expand-manifest#ter39]
  ✅ test_to_rdf[toRdf-manifest#tjs20]
  ✅ test_to_rdf[toRdf-manifest#t0036]
  ✅ test_to_rdf[toRdf-manifest#ter43]
  ✅ test_to_rdf[toRdf-manifest#ter55]
  ✅ test_to_rdf[toRdf-manifest#tjs18]
  ✅ test_expand[html-manifest#te014]
  ⚪ test_expand[expand-manifest#t0040]
  ❌ test_to_rdf[html-manifest#tr022]
	test_case = TestCase(test='html-manifest#tr022', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/...-ld/python-yaml-ld/specifications/json-ld-api/tests/html/r022-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tpr37]
  ✅ test_expand[expand-manifest#t0069]
  ❌ test_to_rdf[toRdf-manifest#te036]
	test_case = TestCase(test='toRdf-manifest#te036', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e036-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_to_rdf[toRdf-manifest#tp003]
  ✅ test_expand[basic-manifest#cr-utf8-1-positive]
  ✅ test_expand[expand-manifest#tpr41]
  ❌ test_to_rdf[toRdf-manifest#te084]
	self = <Graph identifier=Nda93646a33de4cd295519eddbbb77aed (<class 'rdflib.graph.Graph'>)>
  ✅ test_expand[expand-manifest#tc028]
  ✅ test_to_rdf[html-manifest#tr015]
  ⚪ test_expand[expand-manifest#t0066]
  ✅ test_expand[expand-manifest#t0089]
  ✅ test_expand[expand-manifest#t0099]
  ❌ test_to_rdf[toRdf-manifest#t0132]
	test_case = TestCase(test='toRdf-manifest#t0132', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0132-out.nq'), req=None, extract_all_scripts=False, base=None)
  ✅ test_expand[expand-manifest#t0025]
  ✅ test_to_rdf[toRdf-manifest#tc007]
  ✅ test_to_rdf[toRdf-manifest#te069]
  ✅ test_expand[expand-manifest#tjs15]
  ✅ test_expand[expand-manifest#tpr29]
  ❌ test_to_rdf[toRdf-manifest#tpr43]
	self = <Graph identifier=N430f79c7b0a340ff84ff296ec6adbe3b (<class 'rdflib.graph.Graph'>)>
  ✅ test_to_rdf[toRdf-manifest#te065]
  ✅ test_expand[expand-manifest#tem01]
  ✅ test_to_rdf[toRdf-manifest#tli01]
  ✅ test_to_rdf[toRdf-manifest#tc006]
  ✅ test_expand[expand-manifest#t0043]
  ✅ test_expand[expand-manifest#tdi02]
  ✅ test_to_rdf[toRdf-manifest#tpr21]
  ✅ test_expand[expand-manifest#tpr16]
  ⚪ test_expand[expand-manifest#tc037]
  ✅ test_expand[expand-manifest#tn003]
  ✅ test_expand[expand-manifest#t0014]
  ✅ test_to_rdf[toRdf-manifest#tjs23]
  ✅ test_to_rdf[toRdf-manifest#tjs09]
  ✅ test_expand[expand-manifest#tp004]
  ✅ test_to_rdf[toRdf-manifest#te001]
  ✅ test_expand[expand-manifest#tc018]
  ✅ test_expand[expand-manifest#tpr33]
  ❌ test_to_rdf[toRdf-manifest#tso03]
	self = <pyld.context_resolver.ContextResolver object at 0x7fad79e91ea0>
  ✅ test_expand[expand-manifest#tm019]
  ✅ test_to_rdf[toRdf-manifest#tn008]
  ✅ test_to_rdf[toRdf-manifest#te047]
  ❌ test_to_rdf[toRdf-manifest#t0126]

Report exceeded GitHub limit of 65535 bytes and has been trimmed

Annotations

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_expand ► test_local_context

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <pyld.context_resolver.ContextResolver object at 0x7fad7a487340>
Raw output
self = <pyld.context_resolver.ContextResolver object at 0x7fad7a487340>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'
cycles = {'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
>           remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:6583: in load_document
    remote_doc = options['documentLoader'](url, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:98: in loader
    raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

url = 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'
options = {'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'headers': {'Accept': 'appli...w3.org/ns/json-ld#context, application/ld+json, application/json;q=0.5, text/html;q=0.8, application/xhtml+xml;q=0.8'}}

    def loader(url, options={}):
        """
        Retrieves JSON-LD at the given URL.
    
        :param url: the URL to retrieve.
    
        :return: the RemoteDocument.
        """
        try:
            # validate URL
            pieces = urllib_parse.urlparse(url)
            if (not all([pieces.scheme, pieces.netloc]) or
                pieces.scheme not in ['http', 'https'] or
                set(pieces.netloc) > set(
                    string.ascii_letters + string.digits + '-.:')):
>               raise JsonLdError(
                    'URL could not be dereferenced; only "http" and "https" '
                    'URLs are supported.',
                    'jsonld.InvalidUrl', {'url': url},
                    code='loading document failed')
E                   pyld.jsonld.JsonLdError: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:47: JsonLdError

During handling of the above exception, another exception occurred:

document = {'@context': '0127-context-1.jsonld', '@id': 'ex:id', 'prop': {'value': 'v'}}
options = ExpandOptions(base='file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/', extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
>           return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )

yaml_ld/expand.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:163: in expand
    return JsonLdProcessor().expand(input_, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:870: in expand
    expanded = self._expand(active_ctx, None, document, options,
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2302: in _expand
    active_ctx = self._process_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:3049: in _process_context
    resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:58: in resolve
    resolved = self._resolve_remote_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:108: in _resolve_remote_context
    context, remote_doc = self._fetch_context(active_ctx, url, cycles)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyld.context_resolver.ContextResolver object at 0x7fad7a487340>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'
cycles = {'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
            remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')
            context = remote_doc.get('document', url)
        except Exception as cause:
>           raise jsonld.JsonLdError(
                'Dereferencing a URL did not result in a valid JSON-LD object. ' +
                'Possible causes are an inaccessible URL perhaps due to ' +
                'a same-origin policy (ensure the server uses CORS if you are ' +
                'using client-side JavaScript), too many redirects, a ' +
                'non-JSON response, or more than one HTTP Link Header was ' +
                'provided for a remote context.',
                'jsonld.InvalidUrl',
                {'url': url, 'cause': cause},
                code='loading remote context failed')
E           pyld.jsonld.JsonLdError: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
E           Type: jsonld.InvalidUrl
E           Code: loading remote context failed
E           Details: {'url': 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld', 'cause': JsonLdError('URL could not be dereferenced; only "http" and "https" URLs are supported.')}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:148: JsonLdError

The above exception was the direct cause of the following exception:

    @pytest.mark.xfail(
        raises=JsonLdError,
        reason='`pyld` does not handle `file://` paths.',
    )
    def test_local_context():
        document = specifications_root / 'json-ld-api/tests/expand/0127-in.jsonld'
>       yaml_ld.expand(document)

tests/test_expand.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/validate_call_decorator.py:59: in wrapper_function
    return validate_call_wrapper(*args, **kwargs)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/_internal/_validate_call.py:81: in __call__
    res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

document = {'@context': '0127-context-1.jsonld', '@id': 'ex:id', 'prop': {'value': 'v'}}
options = ExpandOptions(base='file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/', extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
            return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )
        except TypeError as err:
            raise MappingKeyError() from err
        except RecursionError as err:
            raise CycleDetected() from err
        except jsonld.JsonLdError as err:
            match err.code:
                case LoadingRemoteContextFailed.code:
>                   raise LoadingRemoteContextFailed(
                        context=err.details['url'],
                        reason=str(err.details['cause']),
                    ) from err
E                   yaml_ld.errors.LoadingRemoteContextFailed: Failed to load the context.
E                   
E                   URL of the context: file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld
E                   Reason: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/0127-context-1.jsonld'}

yaml_ld/expand.py:61: LoadingRemoteContextFailed

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#tc031]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <pyld.context_resolver.ContextResolver object at 0x7fad7a281ea0>
Raw output
self = <pyld.context_resolver.ContextResolver object at 0x7fad7a281ea0>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'c031/c031-context.jsonld', cycles = {'c031/c031-context.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
>           remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:6583: in load_document
    remote_doc = options['documentLoader'](url, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:98: in loader
    raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

url = 'c031/c031-context.jsonld'
options = {'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'headers': {'Accept': 'appli...w3.org/ns/json-ld#context, application/ld+json, application/json;q=0.5, text/html;q=0.8, application/xhtml+xml;q=0.8'}}

    def loader(url, options={}):
        """
        Retrieves JSON-LD at the given URL.
    
        :param url: the URL to retrieve.
    
        :return: the RemoteDocument.
        """
        try:
            # validate URL
            pieces = urllib_parse.urlparse(url)
            if (not all([pieces.scheme, pieces.netloc]) or
                pieces.scheme not in ['http', 'https'] or
                set(pieces.netloc) > set(
                    string.ascii_letters + string.digits + '-.:')):
>               raise JsonLdError(
                    'URL could not be dereferenced; only "http" and "https" '
                    'URLs are supported.',
                    'jsonld.InvalidUrl', {'url': url},
                    code='loading document failed')
E                   pyld.jsonld.JsonLdError: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'c031/c031-context.jsonld'}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:47: JsonLdError

During handling of the above exception, another exception occurred:

document = {'@context': [{'@base': 'http://example.org/a/'}, 'c031/c031-context.jsonld'], 'outer': {'inner': 'ab'}}
options = ExpandOptions(base=None, extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
>           return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )

yaml_ld/expand.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:163: in expand
    return JsonLdProcessor().expand(input_, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:870: in expand
    expanded = self._expand(active_ctx, None, document, options,
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2302: in _expand
    active_ctx = self._process_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:3049: in _process_context
    resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:58: in resolve
    resolved = self._resolve_remote_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:108: in _resolve_remote_context
    context, remote_doc = self._fetch_context(active_ctx, url, cycles)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyld.context_resolver.ContextResolver object at 0x7fad7a281ea0>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'c031/c031-context.jsonld', cycles = {'c031/c031-context.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
            remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')
            context = remote_doc.get('document', url)
        except Exception as cause:
>           raise jsonld.JsonLdError(
                'Dereferencing a URL did not result in a valid JSON-LD object. ' +
                'Possible causes are an inaccessible URL perhaps due to ' +
                'a same-origin policy (ensure the server uses CORS if you are ' +
                'using client-side JavaScript), too many redirects, a ' +
                'non-JSON response, or more than one HTTP Link Header was ' +
                'provided for a remote context.',
                'jsonld.InvalidUrl',
                {'url': url, 'cause': cause},
                code='loading remote context failed')
E           pyld.jsonld.JsonLdError: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
E           Type: jsonld.InvalidUrl
E           Code: loading remote context failed
E           Details: {'url': 'c031/c031-context.jsonld', 'cause': JsonLdError('URL could not be dereferenced; only "http" and "https" URLs are supported.')}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:148: JsonLdError

The above exception was the direct cause of the following exception:

test_case = TestCase(test='toRdf-manifest#tc031', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/c031-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
>       actual_dataset = yaml_ld.to_rdf(test_case.raw_document)

tests/test_specification.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yaml_ld/to_rdf.py:24: in to_rdf
    expanded_document = yaml_ld.expand(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/validate_call_decorator.py:59: in wrapper_function
    return validate_call_wrapper(*args, **kwargs)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/_internal/_validate_call.py:81: in __call__
    res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

document = {'@context': [{'@base': 'http://example.org/a/'}, 'c031/c031-context.jsonld'], 'outer': {'inner': 'ab'}}
options = ExpandOptions(base=None, extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
            return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )
        except TypeError as err:
            raise MappingKeyError() from err
        except RecursionError as err:
            raise CycleDetected() from err
        except jsonld.JsonLdError as err:
            match err.code:
                case LoadingRemoteContextFailed.code:
>                   raise LoadingRemoteContextFailed(
                        context=err.details['url'],
                        reason=str(err.details['cause']),
                    ) from err
E                   yaml_ld.errors.LoadingRemoteContextFailed: Failed to load the context.
E                   
E                   URL of the context: c031/c031-context.jsonld
E                   Reason: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'c031/c031-context.jsonld'}

yaml_ld/expand.py:61: LoadingRemoteContextFailed

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te096]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <Graph identifier=N5284d633fb2a4809ae29478001da4e9e (<class 'rdflib.graph.Graph'>)>
Raw output
self = <Graph identifier=N5284d633fb2a4809ae29478001da4e9e (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a388eb0>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a9330d0>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
>           parser.parse(source, self, **args)

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1494: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:2021: in parse
    p.loadStream(stream)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:479: in loadStream
    return self.loadBuf(stream.read())  # Not ideal
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:485: in loadBuf
    self.feed(buf)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:511: in feed
    i = self.directiveOrStatement(s, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:532: in directiveOrStatement
    return self.checkDot(argstr, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1214: in checkDot
    self.BadSyntax(argstr, j, "expected '.' or '}' or ']' at end of statement")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rdflib.plugins.parsers.notation3.SinkParser object at 0x7fad7a933640>
argstr = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
i = 36, msg = "expected '.' or '}' or ']' at end of statement"

    def BadSyntax(self, argstr: str, i: int, msg: str) -> NoReturn:
>       raise BadSyntax(self._thisDoc, self.lines, argstr, i, msg)
E       rdflib.plugins.parsers.notation3.BadSyntax: <no detail available>

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1730: BadSyntax

During handling of the above exception, another exception occurred:

test_case = TestCase(test='toRdf-manifest#te096', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e096-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
>       expected_graph = Graph().parse(data=raw_expected_quads)

tests/test_specification.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Graph identifier=N5284d633fb2a4809ae29478001da4e9e (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a388eb0>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a9330d0>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
            parser.parse(source, self, **args)
        except SyntaxError as se:
            if could_not_guess_format:
>               raise ParserError(
                    "Could not guess RDF format for %r from file extension so tried Turtle but failed."
                    "You can explicitly specify format using the format argument."
                    % source
                )
E               rdflib.exceptions.ParserError: Could not guess RDF format for <rdflib.parser.StringInputSource object at 0x7fad7a388eb0> from file extension so tried Turtle but failed.You can explicitly specify format using the format argument.

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1497: ParserError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te127]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3a6dd0>
Raw output
self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3a6dd0>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'e127-context-1.jsonld', cycles = {'e127-context-1.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
>           remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:6583: in load_document
    remote_doc = options['documentLoader'](url, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:98: in loader
    raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

url = 'e127-context-1.jsonld'
options = {'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'headers': {'Accept': 'appli...w3.org/ns/json-ld#context, application/ld+json, application/json;q=0.5, text/html;q=0.8, application/xhtml+xml;q=0.8'}}

    def loader(url, options={}):
        """
        Retrieves JSON-LD at the given URL.
    
        :param url: the URL to retrieve.
    
        :return: the RemoteDocument.
        """
        try:
            # validate URL
            pieces = urllib_parse.urlparse(url)
            if (not all([pieces.scheme, pieces.netloc]) or
                pieces.scheme not in ['http', 'https'] or
                set(pieces.netloc) > set(
                    string.ascii_letters + string.digits + '-.:')):
>               raise JsonLdError(
                    'URL could not be dereferenced; only "http" and "https" '
                    'URLs are supported.',
                    'jsonld.InvalidUrl', {'url': url},
                    code='loading document failed')
E                   pyld.jsonld.JsonLdError: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'e127-context-1.jsonld'}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/documentloader/requests.py:47: JsonLdError

During handling of the above exception, another exception occurred:

document = {'@context': 'e127-context-1.jsonld', '@id': 'ex:id', 'prop': {'value': 'v'}}
options = ExpandOptions(base=None, extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
>           return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )

yaml_ld/expand.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:163: in expand
    return JsonLdProcessor().expand(input_, options)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:870: in expand
    expanded = self._expand(active_ctx, None, document, options,
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2302: in _expand
    active_ctx = self._process_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:3049: in _process_context
    resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:58: in resolve
    resolved = self._resolve_remote_context(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:108: in _resolve_remote_context
    context, remote_doc = self._fetch_context(active_ctx, url, cycles)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyld.context_resolver.ContextResolver object at 0x7fad7a3a6dd0>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
url = 'e127-context-1.jsonld', cycles = {'e127-context-1.jsonld'}

    def _fetch_context(self, active_ctx, url, cycles):
        # check for max context URLs fetched during a resolve operation
        if len(cycles) > MAX_CONTEXT_URLS:
            raise jsonld.JsonLdError(
                'Maximum number of @context URLs exceeded.',
                'jsonld.ContextUrlError', {'max': MAX_CONTEXT_URLS},
                code=('loading remote context failed'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # check for context URL cycle
        # shortcut to avoid extra work that would eventually hit the max above
        if url in cycles:
            raise jsonld.JsonLdError(
                'Cyclical @context URLs detected.',
                'jsonld.ContextUrlError', {'url': url},
                code=('recursive context inclusion'
                      if active_ctx.get('processingMode') == 'json-ld-1.0'
                      else 'context overflow'))
    
        # track cycles
        cycles.add(url)
    
        try:
            remote_doc = jsonld.load_document(url,
                {'documentLoader': self.document_loader},
                requestProfile='http://www.w3.org/ns/json-ld#context')
            context = remote_doc.get('document', url)
        except Exception as cause:
>           raise jsonld.JsonLdError(
                'Dereferencing a URL did not result in a valid JSON-LD object. ' +
                'Possible causes are an inaccessible URL perhaps due to ' +
                'a same-origin policy (ensure the server uses CORS if you are ' +
                'using client-side JavaScript), too many redirects, a ' +
                'non-JSON response, or more than one HTTP Link Header was ' +
                'provided for a remote context.',
                'jsonld.InvalidUrl',
                {'url': url, 'cause': cause},
                code='loading remote context failed')
E           pyld.jsonld.JsonLdError: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
E           Type: jsonld.InvalidUrl
E           Code: loading remote context failed
E           Details: {'url': 'e127-context-1.jsonld', 'cause': JsonLdError('URL could not be dereferenced; only "http" and "https" URLs are supported.')}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/context_resolver.py:148: JsonLdError

The above exception was the direct cause of the following exception:

test_case = TestCase(test='toRdf-manifest#te127', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e127-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
>       actual_dataset = yaml_ld.to_rdf(test_case.raw_document)

tests/test_specification.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yaml_ld/to_rdf.py:24: in to_rdf
    expanded_document = yaml_ld.expand(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/validate_call_decorator.py:59: in wrapper_function
    return validate_call_wrapper(*args, **kwargs)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pydantic/_internal/_validate_call.py:81: in __call__
    res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

document = {'@context': 'e127-context-1.jsonld', '@id': 'ex:id', 'prop': {'value': 'v'}}
options = ExpandOptions(base=None, extract_all_scripts=False, document_loader=None, context=None)

    @specified_by(API / '#dom-jsonldprocessor-expand')
    @validate_call(config=dict(arbitrary_types_allowed=True))
    def expand(   # noqa: C901, WPS211
        document: SerializedDocument | Document,
        options: ExpandOptions = ExpandOptions(),
    ) -> Document | list[Document]:
        """Expand a YAML-LD document."""
        if isinstance(document, (str, bytes, Path, URL)):
            if isinstance(document, Path) and options.base is None:
                options.base = f'file://{document.parent}/'
    
            document = parse(
                document,
                extract_all_scripts=options.extract_all_scripts,
            )
    
        try:
            return jsonld.expand(
                input_=document,
                options=options.model_dump(),
            )
        except TypeError as err:
            raise MappingKeyError() from err
        except RecursionError as err:
            raise CycleDetected() from err
        except jsonld.JsonLdError as err:
            match err.code:
                case LoadingRemoteContextFailed.code:
>                   raise LoadingRemoteContextFailed(
                        context=err.details['url'],
                        reason=str(err.details['cause']),
                    ) from err
E                   yaml_ld.errors.LoadingRemoteContextFailed: Failed to load the context.
E                   
E                   URL of the context: e127-context-1.jsonld
E                   Reason: ('URL could not be dereferenced; only "http" and "https" URLs are supported.',)
E                   Type: jsonld.InvalidUrl
E                   Code: loading document failed
E                   Details: {'url': 'e127-context-1.jsonld'}

yaml_ld/expand.py:61: LoadingRemoteContextFailed

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_expand[expand-manifest#ter56]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  test_case = TestCase(test='expand-manifest#ter56', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specification...on-ld-api/tests/expand/er56-in.jsonld'), result='keyword redefinition', req=None, extract_all_scripts=False, base=None)
Raw output
test_case = TestCase(test='expand-manifest#ter56', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specification...on-ld-api/tests/expand/er56-in.jsonld'), result='keyword redefinition', req=None, extract_all_scripts=False, base=None)
test_against_ld_library = <function test_against_ld_library.<locals>._test at 0x7fad7a3f6c20>

    @pytest.mark.parametrize('test_case', load_tests(tests.ExpandTest), ids=_get_id)
    def test_expand(
        test_case: TestCase,
        test_against_ld_library,
    ):
        try:
>           test_against_ld_library(
                test_case=test_case,
                parse=yaml_ld.parse,
                expand=yaml_ld.expand,
            )

tests/test_specification.py:119: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

test_case = TestCase(test='expand-manifest#ter56', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specification...on-ld-api/tests/expand/er56-in.jsonld'), result='keyword redefinition', req=None, extract_all_scripts=False, base=None)
parse = <function parse at 0x7fad7da01c60>
expand = <function expand at 0x7fad7da02290>

    def _test(test_case: TestCase, parse: Callable, expand: Callable) -> None:
        match test_case.result:
            case str() as error_code:
                try:
                    expanded_document = expand(
                        test_case.input,
                        options=ExpandOptions(
                            extract_all_scripts=test_case.extract_all_scripts,
                        ).model_dump(),
                    )
                except YAMLLDError as error:
                    assert error.code == error_code
                else:
>                   pytest.fail(str(FailureToFail(
                        test_case=test_case,
                        expected_error_code=test_case.result,
                        raw_document=test_case.raw_document,
                        expanded_document=expanded_document,
                    )))
E                   Failed: YAMLLDError not raised.
E                   
E                   Expected error code: keyword redefinition
E                   
E                   Raw input document (from file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications/json-ld-api/tests/expand/er56-in.jsonld):
E                   {
E                     "@context": {
E                       "@context": {
E                         "p": "ex:p"
E                       }
E                     },
E                     "@id": "ex:1",
E                     "p": "value"
E                   }
E                   
E                   
E                   
E                   Expanded document:
E                   [
E                     {
E                       "@id": "ex:1",
E                       "ex:p": [
E                         {
E                           "@value": "value"
E                         }
E                       ]
E                     }
E                   ]

tests/test_specification.py:88: Failed

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te034]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  test_case = TestCase(test='toRdf-manifest#te034', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e034-out.nq'), req=None, extract_all_scripts=False, base=None)
Raw output
test_case = TestCase(test='toRdf-manifest#te034', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e034-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
        expected_graph = Graph().parse(data=raw_expected_quads)
    
>       assert actual_graph.isomorphic(expected_graph)
E       AssertionError: assert False
E        +  where False = <bound method Graph.isomorphic of <Graph identifier=N68393645ac8e4c5fb52c43da5d46ae72 (<class 'rdflib.graph.Graph'>)>>(<Graph identifier=Nf465b7d3ef844c509f006b873844947d (<class 'rdflib.graph.Graph'>)>)
E        +    where <bound method Graph.isomorphic of <Graph identifier=N68393645ac8e4c5fb52c43da5d46ae72 (<class 'rdflib.graph.Graph'>)>> = <Graph identifier=N68393645ac8e4c5fb52c43da5d46ae72 (<class 'rdflib.graph.Graph'>)>.isomorphic

tests/test_specification.py:70: AssertionError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te040]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  test_case = TestCase(test='toRdf-manifest#te040', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e040-out.nq'), req=None, extract_all_scripts=False, base=None)
Raw output
test_case = TestCase(test='toRdf-manifest#te040', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e040-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
        expected_graph = Graph().parse(data=raw_expected_quads)
    
>       assert actual_graph.isomorphic(expected_graph)
E       AssertionError: assert False
E        +  where False = <bound method Graph.isomorphic of <Graph identifier=Nc2223257cdf04fb4a0236e0ad62f8a29 (<class 'rdflib.graph.Graph'>)>>(<Graph identifier=N15a5d33bcab24b3b98f29f6ef7205f39 (<class 'rdflib.graph.Graph'>)>)
E        +    where <bound method Graph.isomorphic of <Graph identifier=Nc2223257cdf04fb4a0236e0ad62f8a29 (<class 'rdflib.graph.Graph'>)>> = <Graph identifier=Nc2223257cdf04fb4a0236e0ad62f8a29 (<class 'rdflib.graph.Graph'>)>.isomorphic

tests/test_specification.py:70: AssertionError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te097]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <Graph identifier=N013e55aec23a42cc98dc7907cdc1f052 (<class 'rdflib.graph.Graph'>)>
Raw output
self = <Graph identifier=N013e55aec23a42cc98dc7907cdc1f052 (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a931c00>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a932290>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
>           parser.parse(source, self, **args)

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1494: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:2021: in parse
    p.loadStream(stream)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:479: in loadStream
    return self.loadBuf(stream.read())  # Not ideal
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:485: in loadBuf
    self.feed(buf)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:511: in feed
    i = self.directiveOrStatement(s, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:532: in directiveOrStatement
    return self.checkDot(argstr, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1214: in checkDot
    self.BadSyntax(argstr, j, "expected '.' or '}' or ']' at end of statement")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rdflib.plugins.parsers.notation3.SinkParser object at 0x7fad7a9318a0>
argstr = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
i = 36, msg = "expected '.' or '}' or ']' at end of statement"

    def BadSyntax(self, argstr: str, i: int, msg: str) -> NoReturn:
>       raise BadSyntax(self._thisDoc, self.lines, argstr, i, msg)
E       rdflib.plugins.parsers.notation3.BadSyntax: <no detail available>

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1730: BadSyntax

During handling of the above exception, another exception occurred:

test_case = TestCase(test='toRdf-manifest#te097', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e097-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
>       expected_graph = Graph().parse(data=raw_expected_quads)

tests/test_specification.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Graph identifier=N013e55aec23a42cc98dc7907cdc1f052 (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a931c00>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b4 <http://example.org/value> "y" _:b3 .\n_:b0 <http://example.org/input> _:b3 .\n_:b0 <http://example.org/input> _:b1 .\n_:b2 <http://example.org/value> "x" _:b1 .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a932290>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
            parser.parse(source, self, **args)
        except SyntaxError as se:
            if could_not_guess_format:
>               raise ParserError(
                    "Could not guess RDF format for %r from file extension so tried Turtle but failed."
                    "You can explicitly specify format using the format argument."
                    % source
                )
E               rdflib.exceptions.ParserError: Could not guess RDF format for <rdflib.parser.StringInputSource object at 0x7fad7a931c00> from file extension so tried Turtle but failed.You can explicitly specify format using the format argument.

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1497: ParserError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#t0127]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  test_case = TestCase(test='toRdf-manifest#t0127', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0127-out.nq'), req=None, extract_all_scripts=False, base=None)
Raw output
test_case = TestCase(test='toRdf-manifest#t0127', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/0127-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
        expected_graph = Graph().parse(data=raw_expected_quads)
    
>       assert actual_graph.isomorphic(expected_graph)
E       AssertionError: assert False
E        +  where False = <bound method Graph.isomorphic of <Graph identifier=N5b8c313f70a9458f9277bff8a78e29c5 (<class 'rdflib.graph.Graph'>)>>(<Graph identifier=N64d41504e703402bac748b1a8398d140 (<class 'rdflib.graph.Graph'>)>)
E        +    where <bound method Graph.isomorphic of <Graph identifier=N5b8c313f70a9458f9277bff8a78e29c5 (<class 'rdflib.graph.Graph'>)>> = <Graph identifier=N5b8c313f70a9458f9277bff8a78e29c5 (<class 'rdflib.graph.Graph'>)>.isomorphic

tests/test_specification.py:70: AssertionError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te122]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <pyld.jsonld.JsonLdProcessor object at 0x7fad7a7efca0>
Raw output
self = <pyld.jsonld.JsonLdProcessor object at 0x7fad7a7efca0>
input_ = [{'http://example.org/vocab/at': [{'@id': '@'}], 'http://example.org/vocab/foo.bar': [{'@id': '@foo.bar'}], 'http://example.org/vocab/ignoreme': [{'@id': None}]}]
options = {'base': '', 'contextResolver': <pyld.context_resolver.ContextResolver object at 0x7fad7a7bd600>, 'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'extractAllScripts': True, ...}

    def to_rdf(self, input_, options):
        """
        Outputs the RDF dataset found in the given JSON-LD object.
    
        :param input_: the JSON-LD input.
        :param options: the options to use.
          [base] the base IRI to use.
          [contextResolver] internal use only.
          [format] the format if input is a string:
            'application/n-quads' for N-Quads.
          [produceGeneralizedRdf] true to output generalized RDF, false
            to produce only standard RDF (default: false).
          [documentLoader(url, options)] the document loader
            (default: _default_document_loader).
          [rdfDirection] Only 'i18n-datatype' supported
            (default: None).
    
        :return: the resulting RDF dataset (or a serialization of it).
        """
        # set default options
        options = options.copy() if options else {}
        options.setdefault('base', input_ if _is_string(input_) else '')
        options.setdefault('produceGeneralizedRdf', False)
        options.setdefault('documentLoader', _default_document_loader)
        options.setdefault('contextResolver',
            ContextResolver(_resolved_context_cache, options['documentLoader']))
        options.setdefault('extractAllScripts', True)
        options.setdefault('processingMode', 'json-ld-1.1')
    
        try:
            # expand input
>           expanded = self.expand(input_, options)

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:1219: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:870: in expand
    expanded = self._expand(active_ctx, None, document, options,
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2233: in _expand
    e = self._expand(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2329: in _expand
    self._expand_object(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2728: in _expand_object
    expanded_value = self._expand(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2233: in _expand
    e = self._expand(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2329: in _expand
    self._expand_object(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyld.jsonld.JsonLdProcessor object at 0x7fad7a7efca0>
active_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})
active_property = 'http://example.org/vocab/ignoreme'
expanded_active_property = 'http://example.org/vocab/ignoreme'
element = {'@id': None}, expanded_parent = {}
options = {'base': '', 'contextResolver': <pyld.context_resolver.ContextResolver object at 0x7fad7a7bd600>, 'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'extractAllScripts': True, ...}
inside_list = False, type_key = None
type_scoped_ctx = frozendict.frozendict({'_uuid': '2b17b84a-058d-11ef-98c1-23c46d64ccb1', 'processingMode': 'json-ld-1.1', 'mappings': {}})

    def _expand_object(
            self, active_ctx, active_property, expanded_active_property,
            element, expanded_parent, options,
            inside_list=False,
            type_key=None,
            type_scoped_ctx=None):
        """
        Expand each key and value of element adding to result.
    
        :param active_ctx: the context to use.
        :param active_property: the property for the element, None for none.
        :param expanded_active_property: the expansion of active_property
        :param element: the element to expand.
        :param expanded_parent: the expanded result into which to add values.
        :param options: the expansion options.
        :param inside_list: True if the property is a list, False if not.
    
        :return: the expanded value.
        """
    
        nests = []
        unexpanded_value = None
        is_json_type = False
    
        if type_key in element:
            if element[type_key] and _is_array(element[type_key]):
                t = element[type_key][0]
            else:
                t = element[type_key]
            is_json_type = self._expand_iri(
                active_ctx, t, vocab=True) == '@json'
    
        for key, value in sorted(element.items()):
            if key == '@context':
                continue
    
            # expand key to IRI
            expanded_property = self._expand_iri(
                active_ctx, key, vocab=True)
    
            # drop non-absolute IRI keys that aren't keywords
            if (expanded_property is None or
                not (
                    _is_absolute_iri(expanded_property) or
                    _is_keyword(expanded_property))):
                continue
    
            if _is_keyword(expanded_property):
                if expanded_active_property == '@reverse':
                    raise JsonLdError(
                        'Invalid JSON-LD syntax; a keyword cannot be used as '
                        'a @reverse property.',
                        'jsonld.SyntaxError', {'value': value},
                        code='invalid reverse property map')
                if (expanded_property in expanded_parent and
                    expanded_property != '@included' and
                    expanded_property != '@type'):
                    raise JsonLdError(
                        'Invalid JSON-LD syntax; colliding keywords detected.',
                        'jsonld.SyntaxError', {'keyword': expanded_property},
                        code='colliding keywords')
    
            # syntax error if @id is not a string
            if expanded_property == '@id':
                if not _is_string(value):
                    if not options.get('isFrame'):
>                       raise JsonLdError(
                            'Invalid JSON-LD syntax; "@id" value must be a '
                            'string.', 'jsonld.SyntaxError',
                            {'value': value}, code='invalid @id value')
E                       pyld.jsonld.JsonLdError: ('Invalid JSON-LD syntax; "@id" value must be a string.',)
E                       Type: jsonld.SyntaxError
E                       Code: invalid @id value
E                       Details: {'value': None}

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:2488: JsonLdError

During handling of the above exception, another exception occurred:

test_case = TestCase(test='toRdf-manifest#te122', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e122-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
>       actual_dataset = yaml_ld.to_rdf(test_case.raw_document)

tests/test_specification.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yaml_ld/to_rdf.py:32: in to_rdf
    return jsonld.to_rdf(
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:315: in to_rdf
    return JsonLdProcessor().to_rdf(input_, options)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyld.jsonld.JsonLdProcessor object at 0x7fad7a7efca0>
input_ = [{'http://example.org/vocab/at': [{'@id': '@'}], 'http://example.org/vocab/foo.bar': [{'@id': '@foo.bar'}], 'http://example.org/vocab/ignoreme': [{'@id': None}]}]
options = {'base': '', 'contextResolver': <pyld.context_resolver.ContextResolver object at 0x7fad7a7bd600>, 'documentLoader': <function requests_document_loader.<locals>.loader at 0x7fad7f4facb0>, 'extractAllScripts': True, ...}

    def to_rdf(self, input_, options):
        """
        Outputs the RDF dataset found in the given JSON-LD object.
    
        :param input_: the JSON-LD input.
        :param options: the options to use.
          [base] the base IRI to use.
          [contextResolver] internal use only.
          [format] the format if input is a string:
            'application/n-quads' for N-Quads.
          [produceGeneralizedRdf] true to output generalized RDF, false
            to produce only standard RDF (default: false).
          [documentLoader(url, options)] the document loader
            (default: _default_document_loader).
          [rdfDirection] Only 'i18n-datatype' supported
            (default: None).
    
        :return: the resulting RDF dataset (or a serialization of it).
        """
        # set default options
        options = options.copy() if options else {}
        options.setdefault('base', input_ if _is_string(input_) else '')
        options.setdefault('produceGeneralizedRdf', False)
        options.setdefault('documentLoader', _default_document_loader)
        options.setdefault('contextResolver',
            ContextResolver(_resolved_context_cache, options['documentLoader']))
        options.setdefault('extractAllScripts', True)
        options.setdefault('processingMode', 'json-ld-1.1')
    
        try:
            # expand input
            expanded = self.expand(input_, options)
        except JsonLdError as cause:
>           raise JsonLdError(
                'Could not expand input before serialization to '
                'RDF.', 'jsonld.RdfError', cause=cause)
E           pyld.jsonld.JsonLdError: ('Could not expand input before serialization to RDF.',)
E           Type: jsonld.RdfError
E           Cause: ('Invalid JSON-LD syntax; "@id" value must be a string.',)
E           Type: jsonld.SyntaxError
E           Code: invalid @id value
E           Details: {'value': None}  File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 1219, in to_rdf
E               expanded = self.expand(input_, options)
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 870, in expand
E               expanded = self._expand(active_ctx, None, document, options,
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2233, in _expand
E               e = self._expand(
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2329, in _expand
E               self._expand_object(
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2728, in _expand_object
E               expanded_value = self._expand(
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2233, in _expand
E               e = self._expand(
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2329, in _expand
E               self._expand_object(
E             File "/home/runner/.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py", line 2488, in _expand_object
E               raise JsonLdError(

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/pyld/jsonld.py:1221: JsonLdError

Check failure on line 0 in tests/artifacts/pytest.xml

See this annotation in the file changed.

@github-actions github-actions / pytest

pytest ► tests.test_specification ► test_to_rdf[toRdf-manifest#te099]

Failed test found in:
  tests/artifacts/pytest.xml
Error:
  self = <Graph identifier=N065047042f0b43168e47ade3050fcb21 (<class 'rdflib.graph.Graph'>)>
Raw output
self = <Graph identifier=N065047042f0b43168e47ade3050fcb21 (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a758ac0>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b1 <http://example.org/value> "x" <http://example.com/g1> .\n_:b2 <http://example.org/value> "y" <http://example.co..._:b0 <http://example.org/input> <http://example.com/g1> .\n_:b0 <http://example.org/input> <http://example.com/g2> .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a759000>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
>           parser.parse(source, self, **args)

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1494: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:2021: in parse
    p.loadStream(stream)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:479: in loadStream
    return self.loadBuf(stream.read())  # Not ideal
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:485: in loadBuf
    self.feed(buf)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:511: in feed
    i = self.directiveOrStatement(s, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:532: in directiveOrStatement
    return self.checkDot(argstr, j)
../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1214: in checkDot
    self.BadSyntax(argstr, j, "expected '.' or '}' or ']' at end of statement")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rdflib.plugins.parsers.notation3.SinkParser object at 0x7fad7a7581c0>
argstr = '_:b1 <http://example.org/value> "x" <http://example.com/g1> .\n_:b2 <http://example.org/value> "y" <http://example.co..._:b0 <http://example.org/input> <http://example.com/g1> .\n_:b0 <http://example.org/input> <http://example.com/g2> .\n'
i = 36, msg = "expected '.' or '}' or ']' at end of statement"

    def BadSyntax(self, argstr: str, i: int, msg: str) -> NoReturn:
>       raise BadSyntax(self._thisDoc, self.lines, argstr, i, msg)
E       rdflib.plugins.parsers.notation3.BadSyntax: <no detail available>

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/plugins/parsers/notation3.py:1730: BadSyntax

During handling of the above exception, another exception occurred:

test_case = TestCase(test='toRdf-manifest#te099', input=URL('file:///home/runner/work/python-yaml-ld/python-yaml-ld/specifications...ld/python-yaml-ld/specifications/json-ld-api/tests/toRdf/e099-out.nq'), req=None, extract_all_scripts=False, base=None)

    @pytest.mark.parametrize(
        'test_case',
        load_tests(tests.ToRDFTest),
        ids=_get_id,
    )
    def test_to_rdf(test_case: TestCase):
        if isinstance(test_case.result, str):
            try:
                rdf_document = yaml_ld.to_rdf(
                    test_case.input,
                    extract_all_scripts=test_case.extract_all_scripts,
                )
            except YAMLLDError as error:
                assert error.code == test_case.result
                return
    
            else:
                pytest.fail(str(FailureToFail(
                    test_case=test_case,
                    expected_error_code=test_case.result,
                    raw_document=test_case.raw_document,
                    expanded_document=rdf_document,
                )))
    
        actual_dataset = yaml_ld.to_rdf(test_case.raw_document)
        raw_expected_quads = test_case.raw_expected_document
    
        actual_triples = actual_dataset['@default']
        actual_graph: Graph = _rdflib_graph_from_pyld_dataset(actual_triples)
>       expected_graph = Graph().parse(data=raw_expected_quads)

tests/test_specification.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Graph identifier=N065047042f0b43168e47ade3050fcb21 (<class 'rdflib.graph.Graph'>)>
source = <rdflib.parser.StringInputSource object at 0x7fad7a758ac0>
publicID = None, format = 'turtle', location = None, file = None
data = '_:b1 <http://example.org/value> "x" <http://example.com/g1> .\n_:b2 <http://example.org/value> "y" <http://example.co..._:b0 <http://example.org/input> <http://example.com/g1> .\n_:b0 <http://example.org/input> <http://example.com/g2> .\n'
args = {}, could_not_guess_format = True
parser = <rdflib.plugins.parsers.notation3.TurtleParser object at 0x7fad7a759000>

    def parse(
        self,
        source: Optional[
            Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]
        ] = None,
        publicID: Optional[str] = None,  # noqa: N803
        format: Optional[str] = None,
        location: Optional[str] = None,
        file: Optional[Union[BinaryIO, TextIO]] = None,
        data: Optional[Union[str, bytes]] = None,
        **args: Any,
    ) -> "Graph":
        """
        Parse an RDF source adding the resulting triples to the Graph.
    
        The source is specified using one of source, location, file or data.
    
        .. caution::
    
           This method can access directly or indirectly requested network or
           file resources, for example, when parsing JSON-LD documents with
           ``@context`` directives that point to a network location.
    
           When processing untrusted or potentially malicious documents,
           measures should be taken to restrict network and file access.
    
           For information on available security measures, see the RDFLib
           :doc:`Security Considerations </security_considerations>`
           documentation.
    
        :Parameters:
    
          - ``source``: An InputSource, file-like object, or string. In the case
            of a string the string is the location of the source.
          - ``location``: A string indicating the relative or absolute URL of
            the source. Graph's absolutize method is used if a relative location
            is specified.
          - ``file``: A file-like object.
          - ``data``: A string containing the data to be parsed.
          - ``format``: Used if format can not be determined from source, e.g.
            file extension or Media Type. Defaults to text/turtle. Format
            support can be extended with plugins, but "xml", "n3" (use for
            turtle), "nt" & "trix" are built in.
          - ``publicID``: the logical URI to use as the document base. If None
            specified the document location is used (at least in the case where
            there is a document location).
    
        :Returns:
    
          - self, the graph instance.
    
        Examples:
    
        >>> my_data = '''
        ... <rdf:RDF
        ...   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        ...   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
        ... >
        ...   <rdf:Description>
        ...     <rdfs:label>Example</rdfs:label>
        ...     <rdfs:comment>This is really just an example.</rdfs:comment>
        ...   </rdf:Description>
        ... </rdf:RDF>
        ... '''
        >>> import os, tempfile
        >>> fd, file_name = tempfile.mkstemp()
        >>> f = os.fdopen(fd, "w")
        >>> dummy = f.write(my_data)  # Returns num bytes written
        >>> f.close()
    
        >>> g = Graph()
        >>> result = g.parse(data=my_data, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> result = g.parse(location=file_name, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> g = Graph()
        >>> with open(file_name, "r") as f:
        ...     result = g.parse(f, format="application/rdf+xml")
        >>> len(g)
        2
    
        >>> os.remove(file_name)
    
        >>> # default turtle parsing
        >>> result = g.parse(data="<http://example.com/a> <http://example.com/a> <http://example.com/a> .")
        >>> len(g)
        3
    
        """
    
        source = create_input_source(
            source=source,
            publicID=publicID,
            location=location,
            file=file,
            data=data,
            format=format,
        )
        if format is None:
            format = source.content_type
        could_not_guess_format = False
        if format is None:
            if (
                hasattr(source, "file")
                and getattr(source.file, "name", None)
                and isinstance(source.file.name, str)
            ):
                format = rdflib.util.guess_format(source.file.name)
            if format is None:
                format = "turtle"
                could_not_guess_format = True
        parser = plugin.get(format, Parser)()
        try:
            # TODO FIXME: Parser.parse should have **kwargs argument.
            parser.parse(source, self, **args)
        except SyntaxError as se:
            if could_not_guess_format:
>               raise ParserError(
                    "Could not guess RDF format for %r from file extension so tried Turtle but failed."
                    "You can explicitly specify format using the format argument."
                    % source
                )
E               rdflib.exceptions.ParserError: Could not guess RDF format for <rdflib.parser.StringInputSource object at 0x7fad7a758ac0> from file extension so tried Turtle but failed.You can explicitly specify format using the format argument.

../../../.cache/pypoetry/virtualenvs/python-yaml-ld-9I021CQq-py3.10/lib/python3.10/site-packages/rdflib/graph.py:1497: ParserError