test_eval.py 513 Bytes
Newer Older
Dean Moldovan's avatar
Dean Moldovan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


def test_eval(capture):
    from pybind11_tests import example_eval

    with capture:
        example_eval()
    assert capture == """
        eval_statements test
        Hello World!
        eval_statements passed
        eval test
        eval passed
        eval_single_statement test
        eval_single_statement passed
        eval_file test
        eval_file passed
        eval failure test
        eval failure test passed
        eval_file failure test
        eval_file failure test passed
    """