Commit Graph
1117 Commits
Author SHA1 Message Date
Eksperimental 99d919e0c8 Use "code point" instead of "codepoint" (#8774)
That's the term it is used in the Unicode standard.
2019-02-06 11:21:03 +01:00
Eksperimental 083974aacf ExUnit: Improve timeout error message and info (#8766) 2019-02-04 10:01:56 +01:00
Tobiasz Małecki 38e369766d Improve the docs for ExUnit.Case (#8709) 2019-01-25 18:27:47 +01:00
Tobiasz Małecki 3bd3f88d57 ExUnit.Callbacks moduledoc example improvement (#8708) 2019-01-25 14:55:02 +01:00
Tobiasz Małecki 54d2b58f3e ExUnit.Assertions docs examples improvement (#8698) 2019-01-25 08:23:16 +01:00
Tobiasz Małecki a4e41d059c ExUnit.DocTest moduledoc examples improvement (#8697) 2019-01-25 08:22:25 +01:00
Tobiasz Małecki 22b8238c50 ExUnit.CaseTemplate moduledoc example improvement (#8696) 2019-01-24 22:40:06 +01:00
Tobiasz Małecki d9f0488fc1 ExUnit.CaptureIO documentation examples improvement (#8695) 2019-01-24 22:39:38 +01:00
Tobiasz Małecki a128b0ac07 ExUnit.CaptureLog moduledoc improvement (#8693) 2019-01-24 22:19:54 +01:00
José Valim fee525f65e Do not execute :rand.uniform/1 at the time the docs are defined
Closes #8689
2019-01-24 17:33:04 +01:00
Devon Estes 4da4ccdb8c Add ability to filter by more than one line number (#8673) 2019-01-23 13:34:42 +01:00
Fernando Tapia Rico 13179d2958 Augment doctest errors with misplaced opaque types (#8653) 2019-01-22 08:48:10 +01:00
Fernando Tapia Rico 7af2e48156 Minor grammar fix in ExUnit.CaptureIO (#8644)
[ci skip]
2019-01-17 19:33:45 +01:00
José Valim 17e86fd7eb Improve capture_io signature and docs 2019-01-17 17:59:17 +01:00
José Valim b8c68e6df3 Clarify the need for stop_supervised/1 2019-01-17 13:44:36 +01:00
Eksperimental 0da99435c3 Use ID and not id (#8639)
The command used to detect these entries:
ag -s "\b(?<![/:{_\[.])ids?(?![}:_\]])(?!\(\))(?!enti)(?!ea)(?!iom)(?!x)"  --elixir
2019-01-16 19:14:39 +01:00
Devon Estes ffa3c8bc4b Add documentation about ExUnit.Test.time (#8583)
* Add documentation about ExUnit.Test.time

Now we're specifying what that integer actually represents -
microseconds!

* Update lib/ex_unit/lib/ex_unit.ex

Co-Authored-By: devonestes <devon.c.estes@gmail.com>
2019-01-01 19:12:57 +01:00
José Valim 963c3eb61d No longer wrap doctest errors in custom exception
They end-up hiding more information than showing.

Closes #8547
2018-12-31 12:17:44 +01:00
José Valim 0c1df34645 Standardize more TODOs 2018-12-21 13:42:54 +01:00
José Valim d85ed42765 Update removal and deprecation annotations
In particular, all deprecated code would be removed on v2.0,
so we don't need to annotate dperecated code with a TODO to
remove it on v2.0.
2018-12-21 13:27:06 +01:00
Fernando Tapia Rico 450261295f Deprecate %{key => value} in typespecs (#8537)
%{required(foo) => bar} and %{optional(foo) => bar} should be used.
2018-12-21 12:55:57 +01:00
eksperimental 5c35c37768 Replace quotation dash with "--"
While correct, it is reported in  #4408 that it will not display correctly em-dashes in
Windows terminals.
2018-12-11 14:42:29 +01:00
José Valim 1904fe0fb0 Avoid race condition on device re-registering 2018-12-06 14:53:32 +01:00
Wojtek Mach fad027f029 Add missing @doc since: "1.8.0" to new functions (#8466) 2018-12-05 17:07:40 +01:00
Emil Lynegaard 00a67e3eea Improve error message in multiline iex doctest (#8462)
The previous indentation error message was of no help
in cases where a doctest had a `iex>` command
with multiline expressions.
2018-12-04 20:24:40 +01:00
José Valim ae644808dd No longer persist dynamically added logger backends (#8424)
Otherwise it is impossible to dynamically remove them,
which partially defeats the point of adding them dynamically
in the first place.

Therefore this commit moves the whole dynamic backend
management to the user.

Closes #8213
2018-11-26 14:36:11 +01:00
Eksperimental 3a3d68385e Revise use of "flag" terminology (#8347) 2018-11-16 09:53:53 +01:00
Edwin Mak 84056459f7 Update documented example for ExUnit register_attribute (#8363) 2018-11-04 20:01:10 +01:00
Eksperimental 8e73f5e03d Change order in which filter meesage are printed in ExUnit.CLIFormatter (#8342)
It was printing this when running: mix test --only foo

Including tags: [:foo]
Excluding tags: [:test]

which is deceiving beucase the order end up rendering useless the include filter.

Swaps the order then.

Additionally swaps the order in ExUnit.Formatter.format_filters/2 and tests,
while not necessary, maintaining the order is a good thing when it's something related
to precedence.
2018-10-26 09:59:27 +02:00
Eksperimental bbaf2c513c Change the precedence in ExUnit.Filters.eval/4 (#8340)
Fixes issues mentioned in #8335, particularly in this discussion:
https://github.com/elixir-lang/elixir/pull/8335#pullrequestreview-168148010

Tests should be first excluded, then included, and then skipped (if any left).
The only exception to the rule is when we explicitly include tests with :skip filter,
to which the :ok value is returned.
2018-10-26 09:59:04 +02:00
Fernando Tapia Rico 2d19ae4640 Remove backticks from error messages and test desc (#8343)
To keep consistency in the codebase.
2018-10-26 08:38:01 +02:00
José Valim 4e8b13e15b Remove extra empty line 2018-10-25 20:56:39 +02:00
José Valim 2e5b941a34 Remove @doc from tests 2018-10-25 20:56:00 +02:00
Eksperimental 5396a8b6b6 Check for line ending in output messages (#8319)
Check for line ending in output messages in ex_unit_tests.exs and beginning of line when applicable. This makes sure we check for the full line,
avoiding unexpected results appearing at the end of the line. Related discussion:
https://github.com/elixir-lang/elixir/pull/8312#discussion_r226867015

Remove on_exit_reload_config/0 and replace it with configure_and_reload_on_exit/1
2018-10-23 10:09:21 +02:00
Eksperimental de9207895b Do not count invalid and excluded twice if setup_all fails 2018-10-21 19:56:18 +02:00
Eksperimental 7aa3918885 Update failure message in ExUnit setup_all callback (#8310)
It is all the module that have been invalidated, not only one.
2018-10-21 10:43:48 +02:00
Eksperimental f9b9aaae9a Clarify docs in ExUnit.Callbacks (#8300) 2018-10-21 10:02:06 +02:00
Eksperimental 0f2c3a62fa Use "third-party" instead of "3rd party" (#8308) 2018-10-20 22:59:21 +02:00
Eksperimental 5a973b92b0 Use "charlist(s)" instead of "char list(s)" (#8307) 2018-10-20 22:57:39 +02:00
Eksperimental b95cea5345 General documentation improvements (#8302) 2018-10-20 10:09:03 +02:00
Eksperimental a9db45208b Touch up max_failures tests in ExUnit (#8294)
- Use setup_all instead of "setup all"
- Rename tests from "pass" to "fail" as the names were inverted
2018-10-20 10:07:39 +02:00
Eksperimental 2ccd487bcf Use the formal expression "For more information" (#8303)
as opposed to the informal one "For more info"
[ci skip]
2018-10-20 10:05:15 +02:00
Eksperimental 6ad2109a6c Improve wording in "See the section" (#8298) 2018-10-20 10:03:44 +02:00
Eksperimental 9e8c4f472b Add backticks around "set of options" (#8297) 2018-10-20 10:02:56 +02:00
José Valim 65d2e033fa Do not make notify public 2018-10-12 16:24:30 +02:00
eksperimental 8c373044dc Introduce ExUnit --max-failures feature
This adds the --max-failures flag to `mix test` task.
When N number of failures is reached, the suite will
be aborted, and return a the total number of tests
finished upto that moment, along with the failures.
If a module is invalid, all its tests are counted as
as failure even though they are reported as invalid.
2018-10-12 16:00:02 +02:00
José Valim 82e225060a Do not return test_module to avoid data copying in runner 2018-10-12 14:25:14 +02:00
Eksperimental 8daec24b8f ExUnit: Replace truthy and falsy functions in assertion tests (#8267) 2018-10-11 07:39:38 +02:00
José Valim 278993ee0a Improve ExUnit example with messages 2018-10-10 16:44:48 +02:00
Eksperimental 6a9dd90bfb Use setup_all instead of "setup all" to refer to the callback (#8266)
[ci skip]
2018-10-10 01:08:16 +02:00