Introduced ConceptsAlgebra

This commit is contained in:
2020-09-27 20:28:50 +02:00
parent 978e5a5939
commit d100b7e8b3
18 changed files with 541 additions and 50 deletions
+17
View File
@@ -0,0 +1,17 @@
from core.builtin_concepts import BuiltinConcepts
from tests.TestUsingMemoryBasedSheerka import TestUsingMemoryBasedSheerka
class TestSheerkaHasAManager(TestUsingMemoryBasedSheerka):
def test_i_can_set_hasa(self):
sheerka, context, king, kingdom = self.init_concepts("king", "kingdom")
res = sheerka.set_hasa(context, sheerka.new("king"), kingdom)
assert res.status
another_king = sheerka.get_by_key("king")
assert another_king.get_prop(BuiltinConcepts.HASA) == {kingdom}
# check that the definition of the concept has been updated
assert sheerka.hasa(sheerka.new("king"), kingdom)