Skip to content

Commit

Permalink
update pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Jan 14, 2025
1 parent dc27453 commit 5a852c9
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions tests/abox/json_custom_relations/test_json_custom_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,21 @@
"youngs_modulus": 100,
"material": "material_1",
"kitem": "kitem_1",
"tensile_strength": [100, 200],
},
{
"name": "specimen_2",
"youngs_modulus": "200-300",
"material": "material_2",
"kitem": ["kitem_2", "kitem_3"],
"tensile_strength": [200, 300],
},
{
"name": "specimen_3",
"youngs_modulus": [300, 400],
"material": "material_3",
"kitem": "kitem_4",
"tensile_strength": [300, 400],
},
]
}
Expand Down Expand Up @@ -90,6 +93,24 @@
"concatenate": True,
},
},
{
"object_location": "tensile_strength[0]",
"relation": "https://w3id.org/steel/ProcessOntology/hasMinimumTensileStrength",
"object_type": {
"iri": "https://w3id.org/steel/ProcessOntology/TensileStrength",
"unit": "MPa",
"suffix": "tensile_strength_min",
},
},
{
"object_location": "tensile_strength[1]",
"relation": "https://w3id.org/steel/ProcessOntology/hasMaximumTensileStrength",
"object_type": {
"iri": "https://w3id.org/steel/ProcessOntology/TensileStrength",
"unit": "MPa",
"suffix": "tensile_strength_max",
},
},
],
}
]
Expand All @@ -103,18 +124,24 @@
ns1:hasIdentifier "specimen_1"^^xsd:string ;
ns1:hasMaterial <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#Material_specimen_1> ;
ns1:hasYoungsModulus <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#YoungsModulus_specimen_1> ;
ns1:hasMaximumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_1> ;
ns1:hasMinimumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_1> ;
ns1:hasKitem <https://w3id.org/steel/ProcessOntology/Kitem/kitem_1> .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#specimen_2> a ns1:Specimen ;
ns1:hasIdentifier "specimen_2"^^xsd:string ;
ns1:hasMaterial <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#Material_specimen_2> ;
ns1:hasYoungsModulus <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#YoungsModulus_specimen_2> ;
ns1:hasMaximumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_2> ;
ns1:hasMinimumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_2> ;
ns1:hasKitem <https://w3id.org/steel/ProcessOntology/Kitem/kitem_2>, <https://w3id.org/steel/ProcessOntology/Kitem/kitem_3> .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#specimen_3> a ns1:Specimen ;
ns1:hasIdentifier "specimen_3"^^xsd:string ;
ns1:hasMaterial <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#Material_specimen_3> ;
ns1:hasYoungsModulus <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#YoungsModulus_specimen_3> ;
ns1:hasMaximumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_3> ;
ns1:hasMinimumTensileStrength <https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_3> ;
ns1:hasKitem <https://w3id.org/steel/ProcessOntology/Kitem/kitem_4> .
Expand All @@ -138,6 +165,30 @@
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#YoungsModulus_specimen_3> a ns1:YoungsModulus ;
ns2:hasUnit "http://qudt.org/vocab/unit/GigaPA"^^xsd:anyURI ;
ns2:value 300, 400 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_1> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 200 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_2> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 300 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_max_specimen_3> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 400 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_1> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 100 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_2> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 200 .
<https://w3id.org/emmo/domain/domain-nanoindentation/nanoindentation#tensile_strength_min_specimen_3> a ns1:TensileStrength ;
ns2:hasUnit "http://qudt.org/vocab/unit/MegaPA"^^xsd:anyURI ;
ns2:value 300 .
"""

EXPECTED = """
Expand Down

0 comments on commit 5a852c9

Please sign in to comment.