blob: 8715dbadb8c5c26f9dcb69e922e247bfcf5f520f [file] [log] [blame]
Dean Moldovan3b44dae2016-08-18 16:55:26 +02001import os
Dean Moldovana0c1ccf2016-08-12 13:50:00 +02002
3
Dean Moldovan3b44dae2016-08-18 16:55:26 +02004def test_evals(capture):
5 from pybind11_tests import (test_eval_statements, test_eval, test_eval_single_statement,
6 test_eval_file, test_eval_failure, test_eval_file_failure)
Dean Moldovana0c1ccf2016-08-12 13:50:00 +02007
8 with capture:
Dean Moldovan3b44dae2016-08-18 16:55:26 +02009 assert test_eval_statements()
10 assert capture == "Hello World!"
11
12 assert test_eval()
13 assert test_eval_single_statement()
14
15 filename = os.path.join(os.path.dirname(__file__), "test_eval_call.py")
16 assert test_eval_file(filename)
17
18 assert test_eval_failure()
19 assert test_eval_file_failure()