Commit Graph
1420 Commits
Author SHA1 Message Date
José Valim 9f984f82d2 Raise on dedented code in doctests 2023-08-27 11:00:57 +02:00
Mitchell Hanberg fc8793d96a docs: grammar in start_link_supervised/2 (#12858) 2023-08-12 23:19:46 +02:00
José Valim 37bcb194df Fix example in describe 2023-08-09 17:06:16 +02:00
José Valim 4a39114f06 Fix references to String.capitalize/1 2023-08-09 17:03:41 +02:00
José Valim a9f650a9e9 Fix infinite loop when diffing functions, closes #12828 2023-08-02 20:45:51 +02:00
Vinícius Müller 48b471d055 Update diagnostics reporting format (#12813) 2023-07-20 18:49:55 +02:00
Santiago Ferreira f027c66712 Remove duplicated async: true option from example (#12798) 2023-07-16 15:50:18 +02:00
José Valim 7858bac32b Revert "Simplify OnExitHandler API"
The private API unfortunately is used by other projects,
which first need to be migrated.
2023-07-13 12:22:56 +02:00
José Valim 2d2ec036f8 Remove unecessary ExUnit process 2023-07-08 12:24:04 +02:00
José Valim 41a18e9e23 Simplify OnExitHandler API 2023-07-08 12:21:13 +02:00
kevinferretti 67207f4b75 Improve default ExUnit seed algorithm and allow changing via config (#12733) 2023-07-01 19:17:38 +02:00
José Valim 70bbfd0964 Refactor doctest tests 2023-06-28 22:32:02 +02:00
Rich Cavanaugh 8cbea343ee Allow variables defined in doctests to be used in expectation (#12730) 2023-06-28 22:28:45 +02:00
Jean Klingler c312b47d08 Always respect options passed to capture_log (#12721) 2023-06-27 20:56:08 +09:00
José Valim 0a66246e97 Fix doctest suite 2023-06-26 21:13:22 +02:00
Vinícius Müller a9e826e3bb Assert on relative lines in doctest tests (#12699) 2023-06-23 00:03:17 +02:00
Jannik Becher e23b60b37f :test_type does not affect the test execution (#12701) 2023-06-22 23:53:34 +02:00
José Valim d80a567532 Fix non-result doctest terminated with fences, closes #12695 2023-06-22 19:05:43 +02:00
José Valim f01df3dcb7 Add doctest_line interpolation 2023-06-22 18:12:29 +02:00
José Valim be4a62aa7e Avoid trailing whitespace on ExDoc messages 2023-06-22 14:46:11 +02:00
José Valim 79dd9c4af6 Fix race condition on concurrent capture_log, closes #12692 2023-06-21 16:44:37 +02:00
Vinícius Müller 0da6662b5e Improvide diagnostics on lexer exceptions (#12670) 2023-06-19 11:07:59 +02:00
nico piderman 14f24b0d52 Extract mark_tests_invalid/2 function in ExUnit.Runner (#12658) 2023-06-13 14:41:37 +02:00
nico piderman 79c89c84ae Mark test cases as invalid when an exit occurs during setup_all (#12651) 2023-06-12 12:52:17 +02:00
José Valim d7c6edbe78 Deprecate negative steps in slice and date operations 2023-06-03 20:44:00 +02:00
Wojtek Mach 1e3341382f Fix Macro.to_string/1 and ExUnit diffs for multi-letter sigils (#12627) 2023-06-01 16:17:51 +02:00
José Valim 490bd9e658 Validate fences early on doctests and avoid stripping twice 2023-05-31 07:52:19 +02:00
José Valim 8e0f3621b2 Include doctest_data in doctest tags 2023-05-30 20:20:57 +02:00
José Valim 491cf4f131 Fix doctest line failure with multiple assertions 2023-05-30 19:34:52 +02:00
José Valim e6c052dbf5 Refactor doctests for upcoming bug fixes 2023-05-30 18:11:58 +02:00
Zach Allaun f2ab40bfdb Expose compile-time test and tag information (#12608) 2023-05-29 09:36:01 +02:00
José Valim 3b77086073 Define "nutrition facts" for "use SomeModule" (#12613)
One common concern about using Elixir libraries
is that "use SomeModule" does not make clear how
it impacts the caller. Most of the time those
changes are minor but it is impossible to know
without traversing the source code.

This pull request suggests defining a summary
alongside each module that succintly explains
the impact of using it.

This is documented as best practice in our guides
and we added the note to all of Elixir modules.
2023-05-29 09:33:21 +02:00
José Valim 677bdd24f1 Fix regression in doctests 2023-05-26 18:17:19 +02:00
José Valim be9dc8a418 mix format 2023-05-26 12:45:07 +02:00
José Valim 8448600ebf Fix doctest lines when compilation fails, closes #12607 2023-05-26 12:44:52 +02:00
José Valim ea31af5944 Refactor doctests suite for maintanability 2023-05-26 12:04:12 +02:00
José Valim 0dadb08ac7 Allow capturing deprecated log level, closes #12605 2023-05-25 15:24:27 +02:00
José Valim ae0a332c0e Simplify context/tags merging in runner 2023-05-07 13:06:42 +02:00
Damir Vandic ef673a103d Pass module tags to setup_all (#12545) 2023-05-07 12:57:44 +02:00
Thanabodee Charoenpiriyakij 4df57ead67 Add @doc since to ExUnit.Case (#12534)
* `describe/2`
* `register_attribute/3`
* `register_test/4`
* `register_test/6`
2023-04-27 12:33:08 +02:00
Ludovic Demblans 1ee7499f6b Fix incorrect documentation about ExUnit.CaseTemplate regarding imports (#12511) 2023-04-11 12:44:40 +02:00
José Valim 80dc08c4ae Fix race conidtion on ExUnit suite 2023-03-08 10:43:27 +01:00
Fabian Becker 51c76fe03c Use seed to randomize require order of test files (#12442) 2023-03-03 09:32:22 +01:00
sabiwara cce9da7c6b Make mix test reports deterministic in OTP26 (#12438)
* Make mix test reports deterministic in OTP26

The reports for the following were both relying on map keys ordering:
- mix test
- mix test.cover

* Fix non-deterministic test
2023-03-02 07:58:12 +01:00
Andrea Leopardi 8405180ebc Use Erlang logger handlers in ExUnit.CaptureLog (#12408) 2023-02-17 07:54:24 +01:00
Andrea Leopardi 7a3b6aaa8b Improve spec for ExUnit.CaptureLog.with_log/2 (#12409) 2023-02-16 16:16:51 +01:00
José Valim 318dd5297b Introduce default_formatter and default_handler config for Logger (#12400)
We now fully integrate with Erlang/OTP logger.

  * Logger.Formatter can now instantiate a compatible Erlamg/OTP logger formatter

  * The default_handler configures the default handler

  * The default_formatter configures the default formatter

  * Backends front-end will be moved to logger_backends package,
    but the implementation will still be shipped as part of Elixir
2023-02-15 17:31:18 +01:00
John Bampton 132633c9ff Remove unneeded trailing whitespace (#12398) 2023-02-13 23:17:24 +01:00
Andrea Leopardi ac8a4a3d1b More errors improvements in ExUnit.Callbacks (#12390) 2023-02-10 10:12:28 +01:00
Andrea Leopardi 9881163ace Improve errors for ExUnit callbacks (#12382) 2023-02-10 08:14:51 +01:00