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
felipe stival
0a08b06f67
Add backticks to tuple in docs ( #12379 )
2023-02-05 23:47:20 +01:00
felipe stival
b3cc3dd47c
Accept {module, function} tuples in ExUnit setup ( #12378 )
2023-02-05 21:42:08 +01:00
José Valim
42af91d6ac
Move capture logging inside the test process
2023-01-28 12:13:03 +01:00
José Valim
79bebf971f
Use new Code.loaded?/1
2023-01-06 23:13:56 +01:00
José Valim
569664cff9
Diff function environment on ExUnit.Diff
2022-12-13 15:58:59 +01:00
José Valim
eed8292f0a
Refactor ExUnit.Diff to no longer use __block__ for multi purposes
2022-12-13 15:58:59 +01:00
sabiwara
4b5097ca6d
Add :on_undefined_variable compiler option ( #12279 )
2022-12-03 18:41:41 +01:00
José Valim
7f97feaaa8
Return values from running doctests and order tests
2022-12-01 13:21:25 +01:00
José Valim
b24869687b
Introduce mechanism to collect several errors in a module ( #12275 )
2022-11-28 15:40:30 +01:00
José Valim
07b7be6e33
Do not quote doctest excerpt
2022-11-23 18:01:11 +01:00