@@ -719,7 +719,7 @@ R packages should be tested for successful library loading. All
719
719
recipes for CRAN packages should begin from `conda_r_skeleton_helper
720
720
<https://github.com/bgruening/conda_r_skeleton_helper> `_ and will
721
721
automatically include library loading tests. However, many R packages
722
- will also include ``testthat `` tests that can potentially be run. While
722
+ also include ``testthat `` tests that can potentially be run. While
723
723
optional, additional testing is encouraged when packages:
724
724
725
725
- provide interaces to other (compiled) libraries (e.g., ``r-curl ``,
@@ -769,13 +769,13 @@ will look like
769
769
We recommend including a library loading check *before * the ``testthat ``
770
770
tests.
771
771
772
- First, one needs to declare that test environment should have ``r-testthat ``
773
- installed. One may need additional packages here, especially if a package
774
- has optional functionality that is tested.
772
+ First, one needs to declare that the test environment have ``r-testthat ``
773
+ installed. One may need additional requirements here, especially if a
774
+ package has optional functionality that is tested.
775
775
776
776
.. note ::
777
777
If any ``testthat `` tests fail due to missing packages, maintainers
778
- are encouraged to communicate this to the upstream repository. Many R
778
+ are encouraged to communicate this to the upstream repository. Some R
779
779
packages have optional functionality that usually involves packages
780
780
listed under the ``Suggests: `` section of the ``DESCRIPTION `` file.
781
781
Developers should be using ``testthat::skip_if_not_installed() ``
@@ -792,14 +792,15 @@ present and needed for specific tests.
792
792
The default R build procedure on conda-forge will not include the
793
793
``tests/ `` directory in the final build. While it is possible to do this
794
794
(via an ``--install-tests `` flag), it is preferable to use the
795
- ``tests.source_files `` in the ``meta.yaml `` to only copy the tests for the
796
- testing phase.
795
+ ``tests.source_files `` in the ``meta.yaml `` to copy the tests for the
796
+ testing phase only .
797
797
798
798
Finally, one uses the ``testthat::test_file() `` function to test the
799
799
``tests/testthat.R `` file, which for most packages serves as the main entry
800
800
point for all the other tests. By default, this function does not return
801
- an error on test failures, so one needs to pass the argument
802
- ``stop_on_failure=TRUE `` to ensure that test failures propagate to the CI.
801
+ an error value on test failures, so one needs to pass the argument
802
+ ``stop_on_failure=TRUE `` to ensure that test failures propagate to
803
+ conda-build.
803
804
804
805
There are scenarios where the ``tests/testthat.R `` file does not orchestrate
805
806
the individual tests. In that case, one can instead test the
0 commit comments