test_eval.py 425 B

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