Skip to content

Commit 879d5ce

Browse files
committed
Global no-data option for now to test the same environment with or without data
1 parent 21ecba9 commit 879d5ce

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/test_provenance.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@
3030
CWLPROV = Namespace("https://w3id.org/cwl/prov#")
3131
OA = Namespace("http://www.w3.org/ns/oa#")
3232

33+
NO_DATA = True
3334

3435
def cwltool(tmp_path: Path, *args: Any) -> Path:
3536
prov_folder = tmp_path / "provenance"
3637
prov_folder.mkdir()
37-
new_args = ["--no-data", "--provenance", str(prov_folder)]
38+
new_args = ["--provenance", str(prov_folder)]
39+
if NO_DATA:
40+
new_args = ["--no-data"] + new_args
3841
new_args.extend(args)
3942
# Run within a temporary directory to not pollute git checkout
4043
tmp_dir = tmp_path / "cwltool-run"
@@ -266,6 +269,9 @@ def check_folders(base_path: Path) -> None:
266269

267270

268271
def check_bagit(base_path: Path) -> None:
272+
if NO_DATA:
273+
return
274+
269275
# check bagit structure
270276
required_files = [
271277
"bagit.txt",
@@ -525,7 +531,8 @@ def check_prov(
525531
g2.parse(file=f, format="nt", publicID=nt_uri)
526532
# TODO: Check g2 statements that it's the same UUID activity inside
527533
# as in the outer step
528-
if directory:
534+
# TODO check with NO_DATA being true is this then false?...
535+
if directory and not NO_DATA:
529536
directories = set(g.subjects(RDF.type, RO.Folder))
530537
assert directories
531538

0 commit comments

Comments
 (0)