def simple_multi(test_inputs: List[str], expected: str) -> None: state: Dict[str, object] = {} out = None for t in test_inputs: prog = create_program(t) out = prog.run(state).value assert str(out) == expected
def testNotCallableError(test_input: str) -> None: with pytest.raises(NotCallable): prog = create_program(test_input) prog.run({})
def testUndefinedError(test_input: str) -> None: with pytest.raises(UndefinedError): prog = create_program(test_input) prog.run({})
def testParseError(test_input: str) -> None: with pytest.raises(ParseError): prog = create_program(test_input) prog.run({})
def test_compute_plus(test_input: str, expected: str) -> None: prog = create_program(test_input) assert str(prog.run({}).value) == expected