Implemented some enhancement requests
This commit is contained in:
@@ -2,6 +2,11 @@ from tests.TestUsingMemoryBasedSheerka import TestUsingMemoryBasedSheerka
|
||||
|
||||
|
||||
class TestSheerkaNonRegDisplay(TestUsingMemoryBasedSheerka):
|
||||
@classmethod
|
||||
def teardown_class(cls):
|
||||
# At the end of the tests, sheerka singleton instance will be corrupted
|
||||
# Ask for a new one
|
||||
TestSheerkaNonRegDisplay.singleton_instance = None
|
||||
|
||||
def test_i_can_display_results_when_return_values_processing_is_on(self, capsys):
|
||||
init = [
|
||||
@@ -51,4 +56,20 @@ post : None
|
||||
ret : None
|
||||
vars : []
|
||||
props : {}
|
||||
"""
|
||||
|
||||
def test_i_can_display_multiple_success(self, capsys):
|
||||
init = [
|
||||
"def concept foo as 1",
|
||||
"def concept foo as 2",
|
||||
]
|
||||
sheerka = self.init_scenario(init)
|
||||
capsys.readouterr()
|
||||
|
||||
sheerka.enable_process_return_values = True
|
||||
sheerka.evaluate_user_input("foo")
|
||||
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == """ReturnValue(who=evaluators.Concept, status=True, value=(1001)foo)
|
||||
ReturnValue(who=evaluators.Concept, status=True, value=(1002)foo)
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user