when I replace this
value = parser.eval(value, env_sobjects=env_sobjects, use_cache=False)
with this
value = parser.eval(value, env_sobjects=env_sobjects)
this code can run, but the results are the same as using Search.eval().
I have found a todo in expression_test.py
TODO: add a use_cache=False kwargs to eval()
maybe I am using tactic 4.5, use_cache kwargs not add yet?
def _test_cache(my):
expr = '@COUNT(unittest/person)'
parser = ExpressionParser()
result = parser.eval(expr, single=True)
my.assertEquals(result, 8)
person = Person.create( "new_person" , "Mr",
"Z" , "Fake Unittest Person Z")
person.set_value("age", "300")
person.commit()
"""TODO: add a use_cache=False kwargs to eval()
expr = '@SOBJECT( unittest/person)'
search = Search('unittest/person')
print "LEN ", len(search.get_sobjects())
parser = ExpressionParser()
result = parser.eval(expr)
print "RES ", result
my.assertEquals(len(result), 9)
"""
value = parser.eval(value, env_sobjects=env_sobjects, use_cache=False)
with this
value = parser.eval(value, env_sobjects=env_sobjects)
this code can run, but the results are the same as using Search.eval().
I have found a todo in expression_test.py
TODO: add a use_cache=False kwargs to eval()
maybe I am using tactic 4.5, use_cache kwargs not add yet?
def _test_cache(my):
expr = '@COUNT(unittest/person)'
parser = ExpressionParser()
result = parser.eval(expr, single=True)
my.assertEquals(result, 8)
person = Person.create( "new_person" , "Mr",
"Z" , "Fake Unittest Person Z")
person.set_value("age", "300")
person.commit()
"""TODO: add a use_cache=False kwargs to eval()
expr = '@SOBJECT( unittest/person)'
search = Search('unittest/person')
print "LEN ", len(search.get_sobjects())
parser = ExpressionParser()
result = parser.eval(expr)
print "RES ", result
my.assertEquals(len(result), 9)
"""