小编alb*_*lar的帖子

“UseMethod(“xml_add_child”) 中的错误“test_dir 不起作用

当我尝试在 test_dir 函数中定义路径时,它显示错误:

Error in UseMethod("xml_add_child") : no applicable method for 'xml_add_child' applied to an object of class "NULL"
Run Code Online (Sandbox Code Playgroud)

我的 testthat.R 文件有以下几行:

library(testthat)
library(package)

options(testthat.junit.output_file = "test-out.xml")
test_dir("tests/testthat/0_utils/", reporter = 'junit')
test_package("package")
Run Code Online (Sandbox Code Playgroud)

我的测试位于“tests/testthat/0_utils”文件夹中。我怎么解决这个问题?

testing r testthat

2
推荐指数
1
解决办法
682
查看次数

标签 统计

r ×1

testing ×1

testthat ×1