def test_NOT_doesnt_match_if_fact_is_not_present_and_InitialFact_neither(): from pyknow.rule import NOT from pyknow.factlist import FactList from pyknow.fact import Fact, InitialFact r = NOT(Fact(something=True)) fl = FactList() assert not r.get_activations(fl)
def test_NOT_match_InitialFact_if_fact_is_not_present(): from pyknow.rule import NOT from pyknow.factlist import FactList from pyknow.fact import Fact, InitialFact r = NOT(Fact(something=True)) fl = FactList() fl.declare(InitialFact()) assert r.get_activations(fl)