testwhat
testwhat copied to clipboard
Use envir_prep for exercise checking
Fixes https://github.com/rstudio/learnr/issues/202
The next release of learnr (v0.10.0
) will provide a copy of the environment before the user executed their code envir_prep
to the exercise checker function (ex: testwhat_learnr
).
Using this environment, checking code will be able to find their setup code.
Disclaimers:
- I have not tested this.
- I do not know if I have broken
run_until_fail
. - I would believe this would work with
learnr
v0.9.2
and the next release of v0.10.0
- Existing users should not have to alter their code to get the expected behavior
cc @matthew-brett @reuning
Codecov Report
Merging #233 into master will increase coverage by
<.01%
. The diff coverage is75%
.
@@ Coverage Diff @@
## master #233 +/- ##
==========================================
+ Coverage 92.11% 92.11% +<.01%
==========================================
Files 47 47
Lines 2586 2588 +2
==========================================
+ Hits 2382 2384 +2
Misses 204 204
Impacted Files | Coverage Δ | |
---|---|---|
R/utils-learnr.R | 0% <0%> (ø) |
:arrow_up: |
R/test-exercise.R | 88.37% <100%> (+0.56%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2f63f96...eba2090. Read the comment docs.