I have a function I want to test which may raise Not_found
I have a test like:
let test_sample =
test @@ fun () ->
let* points = Sample.(list int) in
let result = MyModule.my_func points in
equal Comparator.int result [1;2;3]
When I run this as part of a test suite I just get this:
$ dune test
File "tests/dune", line 2, characters 8-14:
2 | (names mytests)
^^^^^^
Fatal error: exception Not_found
I was expecting the test framework to catch and report unhandled exceptions - in a big test suite it's not clear which test has failed, or where.
I can add my own try/with in the test case but I was just wondering if this is expected behaviour or not?
I have a function I want to test which may raise
Not_foundI have a test like:
When I run this as part of a test suite I just get this:
I was expecting the test framework to catch and report unhandled exceptions - in a big test suite it's not clear which test has failed, or where.
I can add my own
try/within the test case but I was just wondering if this is expected behaviour or not?