test_eval.py revision 12391
1import os
2from pybind11_tests import eval_ as m
3
4
5def test_evals(capture):
6    with capture:
7        assert m.test_eval_statements()
8    assert capture == "Hello World!"
9
10    assert m.test_eval()
11    assert m.test_eval_single_statement()
12
13    filename = os.path.join(os.path.dirname(__file__), "test_eval_call.py")
14    assert m.test_eval_file(filename)
15
16    assert m.test_eval_failure()
17    assert m.test_eval_file_failure()
18