@@ -37,7 +37,7 @@ dependency). But `ReTest` still has to be loaded (as a "test" dependency) in
37
37
order to call ` retest ` .
38
38
39
39
Finally, for convenience, ` @testset ` also implicitly defines a ` runtests ` function
40
- within the enclosing module, say ` M ` , such ` M.runtests(...) ` is equivalent to
40
+ within the enclosing module, say ` M ` , such that ` M.runtests(...) ` is equivalent to
41
41
calling ` retest(M, ...) ` .
42
42
43
43
### ` retest ` docstring
@@ -150,7 +150,27 @@ it can be filtered out.
150
150
When ` Revise ` is loaded and a testset is updated, ` ReTest ` will observe that a
151
151
new testset is added with the same description as a previously existing one,
152
152
which is then overwritten. This works only if the description is not modified,
153
- otherwise both the old and new versions of the testset will co-exist. For
154
- testsets in a "script" loaded with ` includet ` , e.g. those in a "test/tests.jl"
155
- file, you can request ` Revise ` to "load" the updated testsets by putting
156
- ` __revise_mode__ = :eval ` in the enclosing module.
153
+ otherwise both the old and new versions of the testset will co-exist.
154
+
155
+ For testsets in a "script" loaded with ` includet ` , e.g. those in a
156
+ "test/tests.jl" file, you can request ` Revise ` to "load" the updated testsets by
157
+ putting ` __revise_mode__ = :eval ` in the enclosing module.
158
+
159
+ When files are included recursively, plain ` includet ` won't work
160
+ (it is currently documented to be "deliberately non-recursive").
161
+ There are two work-arounds:
162
+ 1 . rename your "test/tests.jl" file to "test/MyPackageTests.jl" and load it as a module
163
+ (this might involve updating your ` LOAD_PATH ` to include "test/" and making sure
164
+ the required packages are found)
165
+ 2 . use the [ following ` recursive_includet ` ] ( https://github.com/timholy/Revise.jl/issues/518#issuecomment-667097500 )
166
+ function instead of ` includet ` :
167
+ ``` julia
168
+ function recursive_includet (filename)
169
+ already_included = copy (Revise. included_files)
170
+ includet (filename)
171
+ newly_included = setdiff (Revise. included_files, already_included)
172
+ for (mod, file) in newly_included
173
+ Revise. track (mod, file)
174
+ end
175
+ end
176
+ ```
0 commit comments