Fixed #101 : Implement PLURIAL
Fixed #103 : Implement PlurialNodeParser Fixed #104 : Implement dynamic concept Fixed #107 : PrepareEvalxxxEvaluator: context hints are lost on a second evaluation
This commit is contained in:
@@ -116,7 +116,8 @@ class TestSheerkaIsAManager(TestUsingMemoryBasedSheerka):
|
||||
|
||||
context.add_to_private_hints(BuiltinConcepts.EVAL_GLOBAL_TRUTH_REQUESTED)
|
||||
|
||||
sheerka.set_isa(context, blue_instance, color)
|
||||
res = sheerka.set_isa(context, blue_instance, color)
|
||||
assert res.status
|
||||
assert sheerka.isa(blue_instance, color)
|
||||
assert sheerka.isaset(context, color)
|
||||
assert sheerka.isinset(blue_instance, color)
|
||||
@@ -423,6 +424,20 @@ class TestSheerkaIsAManager(TestUsingMemoryBasedSheerka):
|
||||
foo = sheerka.get_by_id(foo.id)
|
||||
assert not sheerka.isa(foo, group2)
|
||||
|
||||
def test_i_can_set_isa_twice_when_global_truth_is_true_the_second_time(self):
|
||||
sheerka, context, blue, color = self.init_concepts(Concept("blue"), Concept("color"))
|
||||
global_truth_context = self.get_context(sheerka, global_truth=True)
|
||||
|
||||
blue_instance = sheerka.new("blue")
|
||||
sheerka.set_isa(context, blue_instance, color)
|
||||
|
||||
# set it again with global_truth = True
|
||||
res = sheerka.set_isa(global_truth_context, blue_instance, color)
|
||||
|
||||
assert res.status
|
||||
assert sheerka.isa(blue_instance, color)
|
||||
assert sheerka.isa(sheerka.new("blue"), color) # try another instance
|
||||
|
||||
|
||||
class TestSheerkaSetsManagerUsingFileBasedSheerka(TestUsingFileBasedSheerka):
|
||||
def test_i_can_add_concept_to_set_and_retrieve_it_in_another_session(self):
|
||||
|
||||
Reference in New Issue
Block a user