[new release] alcotest, alcotest-async, alcotest-js, alcotest-mirage and alcotest-lwt (1.5.0) #19735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alcotest is a lightweight and colourful test framework
CHANGES:
Make Alcotest compatible with
js_of_ocaml.3.11.0
. Users can depend on thenew virtual
alcotest-js
Opam library to pick up the rightjs_of_ocaml
version automatically. (Add jsoo support, configure CI mirage/alcotest#326 Add a virtual
alcotest-js
package for JavaScript dependencies mirage/alcotest#328, @hhugo @smorimoto)Record exception backtraces during test suite runs by default. This behaviour
can be disabled by passing
~record_backtrace:false
toAlcotest.run
. (Record exception backtraces during test suite runs mirage/alcotest#317,@craigfe)
Generate shorter unique identifiers for test runs (8-character alphanumeric,
rather than a full 128-bit UUID). (Use shorter random IDs for test runs mirage/alcotest#304, @craigfe)
Change
Alcotest.{char,string}
pretty-printers to use OCaml syntax onassertion failures (i.e. wrap with quotes and escape control characters).
(Print strings and chars with OCaml syntax on assertion failures mirage/alcotest#318, @craigfe)
Fix process for getting the width of attached terminals on MacOS.
Previously, a terminal width of 80 columns was assumed. (Fix bindings to
TIOCGWINSZ
on MacOS mirage/alcotest#325, @craigfe)Fix parsing of test filter ranges to allow '-' separators (e.g.
test alpha 1-4
), as advertised in the manpage. The previously-used '..' separator isalso supported. (Fix the processing of test filter ranges to match the documentation mirage/alcotest#312, @craigfe)
Introduce an
Alcotest.V1
module that aliases the existingAlcotest
API andprovides a stability guarantee over major version changes. Similar versioned
aliases also exist for the backends:
Alcotest_{async,lwt}.V1
. (Introduce a versioned API for Alcotest V1 mirage/alcotest#306,@craigfe)
Change the
~filter
argument toAlcotest.run
to be a predicate over tests.(Change the
~filter
test selector to be a predicate mirage/alcotest#305, @craigfe)Renamed / removed some less frequently used modules used by the test backends:
Alcotest.Unix
->Alcotest.Unix_platform
Alcotest_engine.{Cli,Core,Test}
->Alcotest_engine.V1.{Cli,Core,Test}
Alcotest.{Cli,Core}
are now gone. UseAlcotest_engine.V1.{Cli,Core}.Make (Alcotest.Unix_platform)
instead.(Introduce a versioned API for Alcotest V1 mirage/alcotest#306 Provide versioned aliases for the Async and Lwt backends mirage/alcotest#309, @craigfe)
Avoid exporting
list_tests
in the main test APIs (Alcotest{,_lwt,_async}
).Use
Alcotest_engine
directly if you want this function. (Avoid exportinglist_tests
in the main test APIs mirage/alcotest#310, @craigfe)