diff --git a/tests/test_runner.py b/tests/test_runner.py new file mode 100644 index 0000000..efb2db5 --- /dev/null +++ b/tests/test_runner.py @@ -0,0 +1,12 @@ +from . import runner + + +def test_exec(hello_world, capsys): + runner.exec(hello_world) + out, err = capsys.readouterr() + assert out.strip() == "Hello, World!" + + +def test_eval(): + out = runner.eval("5+5;") + assert out == 10.0