Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Treesarj committed Mar 13, 2024
1 parent 6520494 commit a420cbf
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/strategies/test_mapping.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Tests mapping strategy."""


def test_mapping_without_prefixes() -> None:
"""Test without prefixes."""
from tripper import EMMO, MAP, Namespace
Expand All @@ -27,9 +25,9 @@ def test_mapping_without_prefixes() -> None:
session.update(mapper.get())

collection = get_collection(session)
relations = set(collection.get_relations())
assert (FORCES.forces, MAP.mapsTo, EMMO.Force) in relations
assert (ENERGY.energy, MAP.mapsTo, EMMO.PotentialEnergy) in relations
relations = set((str(s), str(p), str(o)) for s, p, o in collection.get_relations())
assert (str(FORCES.forces), str(MAP.mapsTo), str(EMMO.Force)) in relations
assert (str(ENERGY.energy), str(MAP.mapsTo), str(EMMO.PotentialEnergy)) in relations


def test_mapping_with_prefixes() -> None:
Expand Down Expand Up @@ -62,8 +60,7 @@ def test_mapping_with_prefixes() -> None:
session.update(mapper.get())

collection = get_collection(session)

relations = set(collection.get_relations())
relations = set((str(s), str(p), str(o)) for s, p, o in collection.get_relations())
assert len(list(collection.get_relations())) == len(relations)
assert (FORCES.forces, MAP.mapsTo, EMMO.Force) in relations
assert (ENERGY.energy, MAP.mapsTo, EMMO.PotentialEnergy) in relations
assert (str(FORCES.forces), str(MAP.mapsTo), str(EMMO.Force)) in relations
assert (str(ENERGY.energy), str(MAP.mapsTo), str(EMMO.PotentialEnergy)) in relations

0 comments on commit a420cbf

Please sign in to comment.