forked from r-lib/testthat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
164 lines (110 loc) · 6.02 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Version 0.7.1.99
------------------------------------------------------------------------------
* To better meet CRAN recommended practices, testthat now allows you to
put your tests in `tests/testthat`, instead of `inst/test`. This makes it
possible for users to choose whether or not to install tests. With this
new structure, you'll need to use `test_check()` instead of `test_packages()`
in the test file (usually `tests/test-all.R`) that runs all testthat unit
tests.
* `test_package()` will use `testthat` subdir, if present.
* When using `expect_equal()` to compare strings, the default output for
failure provides a lot more information, which should hopefully help make
finding string mismatches easier.
* `SummaryReporter` has a `max_reports` option to limit the number of detailed
failure reports to show. (Thanks to Peter Meilstrup)
* Tracebacks will now also contain information about where the functions came
from (where that information is available).
* `matches` and `expect_match` now pass additional arguments on to `grepl` so
that you can use `fixed = TRUE`, `perl = TRUE` or `ignore.case = TRUE` to
control details of the match
* `expect_output`, `expect_message`, `expect_warning` and `expect_error` now
also pass ... on to `grepl`, so that you can use `fixed = TRUE`,
`perl = TRUE` or `ignore.case = TRUE`
* Removed `stringr` and `evaluate` dependencies.
* The `not()` function makes it possible to negate tests. For example,
`expect_that(f(), not(throws_error()))` asserts that `f()` does not
throw an error.
* Make `dir_state` less race-y. Contributed by Craig Citro. (#80)
* Add a new reporter so that `testthat` can test calls to `test_that`.
Contributed by Craig Citro. (#83)
Version 0.7.1
------------------------------------------------------------------------------
* Ignore attributes in `is_true` and `is_false` (#49)
* `make_expectation` works for more types of input (#52)
* Now works better with evaluate 0.4.3.
* new `fail()` function always forces a failure in a test. Suggested by
Richie Cotton (#47)
* Added `TapReporter` to produce output compatible with the "test anything
protocol". Contributed by Dan Keshet.
* Fixed where `auto_test` would identify the wrong files as having changed.
(Thanks to Peter Meilstrup)
Version 0.7
------------------------------------------------------------------------------
* `SummaryReporter`: still return informative messages even if no tests
defined (just bare expectations). (Fixes #31)
* Improvements to reference classes (Thanks to John Chambers)
* Bug fixes for when nothing was generated in `gives_warning` /
`shows_message`. (Thanks to Bernd Bischl)
* New `make_expectation` function to programmatically generate an equality
expectation. (Fixes #24)
* `SummaryReporter`: You don't get praise until you have some tests.
* Depend on `methods` rather than requiring it so that testthat works when run
from `Rscript`
* `auto_test` now normalises paths to enable better identification of file
changes, and fixes bug in instantiating new reporter object.
Version 0.6
------------------------------------------------------------------------------
* All `mutatr` classes have been replaced with ReferenceClasses.
* Better documentation for short-hand expectations.
* `test_dir` and `test_package` gain new `filter` argument which allows you to
restrict which tests are run.
Version 0.5
------------------------------------------------------------------------------
* bare expectations now correctly throw errors again
Changes in version 0.4
------------------------------------------------------------------------------
* autotest correctly loads code and executes tests in same environment
* contexts are never closed before they are opened, and always closed at the
end of file
* fixed small bug in `test_dir` where each test was not given its own
environment
* all `expect_*` short cut functions gain a label argument, thanks to Steve
Lianoglou
Changes in version 0.3
------------------------------------------------------------------------------
* all expectations now have a shortcut form, so instead of
expect_that(a, is_identical_to(b))
you can do
expect_identical(a, b)
* new shows_message and gives_warning expectations to test warnings and
messages
* expect_that, equals, is_identical_to and is_equivalent to now have
additional label argument which allows you to control the appearance of the
text used for the expected object (for expect_that) and actual object (for
all other functions) in failure messages. This is useful when you have loops
that run tests as otherwise all the variable names are identical, and it's
difficult to tell which iteration caused the failure.
* executing bare tests gives nicer output
* all expectations now give more information on failure to make it easier to
track down the problem.
* test_file and test_dir now run in code in separate environment to avoid
pollution of global environment. They also temporary change the working
directory so tests can use relative paths.
* test_package makes it easier to run all tests in an installed package. Code
run in this manner has access to non-exported functions and objects. If any
errors or failures occur, test_package will throw an error, making it
suitable for use with R CMD check.
Changes in version 0.2
------------------------------------------------------------------------------
* colourise also works in screen terminal
* equals expectation provides more information about failure
* expect_that has extra info argument to allow you to pass in any extra
information you'd like included in the message - this is very helpful if
you're using a loop to run tests
* is_equivalent_to: new expectation that tests for equality ignoring
attributes
* library_if_available now works! (thanks to report and fix from Felix
Andrews)
* specify larger width and join pieces back together whenever deparse used
(thanks to report and fix from Felix Andrews)
* test_dir now looks for any files starting with test (not test- as before)