Skip to content

Commit

Permalink
test(test_runner.py): add tests fot runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aadhithya committed May 16, 2022
1 parent 38cb454 commit 9657020
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_runner.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9657020

Please sign in to comment.