Open aantron opened 3 years ago
Sadly, there is not. The closest that Alcotest gets to this is the `Quick
/`Slow
tags on tests.
The need for a more generalised form of that feature is tracked by https://github.com/mirage/alcotest/issues/124. I have a WIP draft of an "Alcotest 2.0" API that aims to let users attach arbitrary metadata to tests and then pass filters over that metadata at run-time, which I hope will meet this need.
This has been (partially?) fixed with #368, released in Alcotest 1.7.0, with Alcotest.skip
.
let test_only_on_windows () =
if Sys.os_type <> "Win32" then Alcotest.skip () else ();
(* actual test code *)
For example, OUnit has https://gildor478.github.io/ounit/ounit2/index.html#skip-and-todo-tests. Lwt's ad-hoc tester has
~only_if
arguments for both individual tests and entire test suites.