Skip to content

Commit 4352a4f

Browse files
Fix tests for retroprov
1 parent 4adcc6c commit 4352a4f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/test_fairworkflow.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from conftest import skip_if_nanopub_server_unavailable, read_rdf_test_resource
1111
from fairworkflows import FairWorkflow, FairStep, namespaces, FairVariable, is_fairstep, is_fairworkflow
12+
from fairworkflows.prov import WorkflowRetroProv
1213
from fairworkflows.rdf_wrapper import replace_in_rdf
1314
from nanopub import Publication
1415

@@ -351,10 +352,8 @@ def my_workflow(in1, in2, in3):
351352
result, prov = fw.execute(1, 4, 3)
352353
assert result == -66
353354

354-
assert isinstance(prov, Publication)
355-
356-
prov_log = str(list(prov.assertion.objects(rdflib.URIRef(f'{DUMMY_NANOPUB_URI}#retroprov'),
357-
rdflib.RDFS.label))[0])
355+
assert isinstance(prov, WorkflowRetroProv)
356+
prov_log = str(list(prov.rdf.objects(prov.self_ref, rdflib.RDFS.label))[0])
358357
assert 'Running step: add' in prov_log
359358

360359
def test_workflow_complex_serialization(self):
@@ -375,7 +374,7 @@ def process_image(im: OtherType):
375374
result, prov = fw.execute(obj)
376375
assert isinstance(result, type(obj))
377376
assert result.message == obj.message
378-
assert isinstance(prov, Publication)
377+
assert isinstance(prov, WorkflowRetroProv)
379378

380379
def test_workflow_non_decorated_step(self):
381380
def return_value(a: float) -> float:

0 commit comments

Comments
 (0)