Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow skipping a test case from inside the test case #368

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

apeschar
Copy link
Contributor

@apeschar apeschar commented Dec 13, 2022

This is useful when you want to perform logic to check whether or not some test case can run in the current environment.

let test_only_on_windows () =
  if Sys.os_type <> "Win32" then Alcotest.skip () else ();
  (* actual test code *)

@samoht
Copy link
Member

samoht commented Feb 24, 2023

Hi! Thanks for your contribution, that looks like a good idea!

Out of curiosity, in what context do you use Alcotest? Are you building interesting projects with it? I'm always interested to hear about new use-cases :-)

@samoht samoht merged commit f233c75 into mirage:main Feb 24, 2023
samoht added a commit to samoht/opam-repository that referenced this pull request Feb 24, 2023
…d alcotest-async (1.7.0)

CHANGES:

- compile with MSVC (mirage/alcotest#369, @jonahbeckfordm review by @TheLortex
  and @MisterDA)

- Allow skipping a test case from inside the test case (mirage/alcotest#368, @apeschar)

- Fix compilation on bytecode architectures (mirage/alcotest#335, @glondu)

- Get `alcotest_stubs.c` to compile with MSVC (mirage/alcotest#369, @jonahbeckford)

- Try automatically reporting the location of calls to Alcotest.check.
  (mirage/alcotest#366, @MisterDA, review by @TheLortex)

- Detect that Alcotest is running in CI and change output accordingly.
  (mirage/alcotest#364, @MisterDA)

- Upgrade to `dune >= 3.0`. (mirage/alcotest#360, @MisterDA)
@Khady Khady mentioned this pull request Dec 22, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants