Skip to content

Commit 2241c68

Browse files
committed
get tests working or marked as failing
1 parent b5a42a0 commit 2241c68

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

tests/integration/profiles/workflow-ro-crate-linkml/test_main_workflow.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import pytest
1617

1718
from rocrate_validator.models import Severity
1819
from tests.ro_crates import InvalidMainWorkflow
@@ -21,7 +22,7 @@
2122
# set up logging
2223
logger = logging.getLogger(__name__)
2324

24-
25+
@pytest.mark.xfail(reason="implementation blocked")
2526
def test_main_workflow_bad_type():
2627
"""\
2728
Test a Workflow RO-Crate where the main workflow has an incorrect type.
@@ -52,7 +53,7 @@ def test_main_workflow_no_lang():
5253
profile_identifier="workflow-ro-crate-linkml",
5354
)
5455

55-
56+
@pytest.mark.xfail(reason="not yet implemented")
5657
def test_main_workflow_no_image():
5758
"""\
5859
Test a Workflow RO-Crate where the main workflow does not have an
@@ -69,7 +70,7 @@ def test_main_workflow_no_image():
6970
profile_identifier="workflow-ro-crate-linkml",
7071
)
7172

72-
73+
@pytest.mark.xfail(reason="not yet implemented")
7374
def test_main_workflow_no_cwl_desc():
7475
"""\
7576
Test a Workflow RO-Crate where the main workflow does not have an
@@ -86,7 +87,7 @@ def test_main_workflow_no_cwl_desc():
8687
profile_identifier="workflow-ro-crate-linkml",
8788
)
8889

89-
90+
@pytest.mark.xfail(reason="not yet implemented")
9091
def test_main_workflow_cwl_desc_bad_type():
9192
"""\
9293
Test a Workflow RO-Crate where the main workflow has a CWL description
@@ -101,7 +102,7 @@ def test_main_workflow_cwl_desc_bad_type():
101102
profile_identifier="workflow-ro-crate-linkml",
102103
)
103104

104-
105+
@pytest.mark.xfail(reason="not yet implemented")
105106
def test_main_workflow_cwl_desc_no_lang():
106107
"""\
107108
Test a Workflow RO-Crate where the main workflow has a CWL description
@@ -118,7 +119,7 @@ def test_main_workflow_cwl_desc_no_lang():
118119
profile_identifier="workflow-ro-crate-linkml",
119120
)
120121

121-
122+
@pytest.mark.xfail(reason="not yet implemented")
122123
def test_main_workflow_file_existence():
123124
"""\
124125
Test a Workflow RO-Crate where the main workflow file is not in the crate.
@@ -133,6 +134,7 @@ def test_main_workflow_file_existence():
133134
)
134135

135136

137+
@pytest.mark.xfail(reason="not yet implemented")
136138
def test_workflow_diagram_file_existence():
137139
"""\
138140
Test a Workflow RO-Crate where the workflow diagram file is not in the
@@ -147,7 +149,7 @@ def test_workflow_diagram_file_existence():
147149
profile_identifier="workflow-ro-crate-linkml",
148150
)
149151

150-
152+
@pytest.mark.xfail(reason="not yet implemented")
151153
def test_workflow_description_file_existence():
152154
"""\
153155
Test a Workflow RO-Crate where the workflow CWL description file is not in
@@ -162,7 +164,7 @@ def test_workflow_description_file_existence():
162164
profile_identifier="workflow-ro-crate-linkml",
163165
)
164166

165-
167+
@pytest.mark.xfail(reason="not yet implemented")
166168
def test_main_workflow_bad_conformsto():
167169
"""\
168170
Test a Workflow RO-Crate where the main workflow does not conform to the

tests/integration/profiles/workflow-ro-crate-linkml/test_wroc_crate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import pytest
17+
1618

1719
from rocrate_validator.models import Severity
1820
from tests.ro_crates import WROCNoLicense
1921
from tests.shared import do_entity_test
2022

2123
logger = logging.getLogger(__name__)
2224

23-
25+
@pytest.mark.xfail(reason="not yet implemented")
2426
def test_wroc_no_tests():
2527
"""\
2628
Test a Workflow RO-Crate with no test/ Dataset.
@@ -34,7 +36,7 @@ def test_wroc_no_tests():
3436
profile_identifier="workflow-ro-crate-linkml",
3537
)
3638

37-
39+
@pytest.mark.xfail(reason="not yet implemented")
3840
def test_wroc_no_examples():
3941
"""\
4042
Test a Workflow RO-Crate with no examples/ Dataset.

tests/integration/profiles/workflow-ro-crate-linkml/test_wroc_descriptor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import pytest
1617

1718
from rocrate_validator.models import Severity
1819
from tests.ro_crates import WROCInvalidConformsTo
@@ -22,6 +23,7 @@
2223
logger = logging.getLogger(__name__)
2324

2425

26+
@pytest.mark.xfail(reason="not yet implemented")
2527
def test_wroc_descriptor_bad_conforms_to():
2628
"""\
2729
Test a Workflow RO-Crate where the metadata file descriptor does not

tests/integration/profiles/workflow-ro-crate-linkml/test_wroc_readme.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import pytest
1617

1718
from rocrate_validator.models import Severity
1819
from tests.ro_crates import WROCInvalidReadme
@@ -21,6 +22,7 @@
2122
logger = logging.getLogger(__name__)
2223

2324

25+
@pytest.mark.xfail(reason="not yet implemented")
2426
def test_wroc_readme_not_about_crate():
2527
"""\
2628
Test a Workflow RO-Crate where the README.md is not about the crate.
@@ -35,6 +37,7 @@ def test_wroc_readme_not_about_crate():
3537
)
3638

3739

40+
@pytest.mark.xfail(reason="not yet implemented")
3841
def test_wroc_readme_wrong_encoding_format():
3942
"""\
4043
Test a Workflow RO-Crate where the README.md has the wrong encodingFormat..

tests/integration/profiles/workflow-ro-crate-linkml/test_wroc_root_metadata.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import re
1617

1718
from rocrate_validator.models import Severity
1819
from tests.ro_crates import WROCNoLicense, WROCMainEntity
@@ -31,7 +32,9 @@ def test_wroc_no_license():
3132
False,
3233
["WROC Root Data Entity Required Properties"],
3334
[
34-
"The Crate (Root Data Entity) must specify a license, which should be a URL but can also be a string"
35+
"Less than 1 values on <file://.//>-><http://schema.org/license>"
36+
# TODO: return to message: "The Crate (Root Data Entity) must specify a license, which should be a URL but can also be a string"
37+
# after https://github.com/linkml/linkml/issues/2417 is fixed
3538
],
3639
profile_identifier="workflow-ro-crate-linkml",
3740
)
@@ -45,7 +48,7 @@ def test_wroc_no_mainentity():
4548
WROCMainEntity().wroc_no_mainentity,
4649
Severity.REQUIRED,
4750
False,
48-
["Main Workflow entity existence"],
51+
["WROC Root Data Entity Required Properties"],
4952
[
5053
"The Main Workflow must be specified through a `mainEntity` property in the root data entity"
5154
],

0 commit comments

Comments
 (0)