Skip to content

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

Merged
samoht merged 3 commits into
mirage:mainfrom
apeschar:skip-in-test
Feb 24, 2023
Merged

samoht merged 3 commits into
mirage:mainfrom
apeschar:skip-in-test

Conversation

@apeschar

@apeschar apeschar commented Dec 13, 2022 •

Copy link
Copy Markdown
Contributor

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

samoht commented Feb 24, 2023

Copy link
Copy Markdown
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants