MCPcopy
hub / github.com/pre-commit/pre-commit / test_r_inline

Function test_r_inline

tests/languages/r_test.py:228–245  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

226
227
228def test_r_inline(tmp_path):
229 _make_local_repo(str(tmp_path))
230
231 cmd = '''\
232Rscript -e '
233 stopifnot(packageVersion("rprojroot") == "1.0")
234 cat(commandArgs(trailingOnly = TRUE), "from R!\n", sep=", ")
235'
236'''
237
238 ret = run_language(
239 tmp_path,
240 r,
241 cmd,
242 deps=('rprojroot@1.0',),
243 args=('hi', 'hello'),
244 )
245 assert ret == (0, b'hi, hello, from R!\n')
246
247
248@pytest.fixture

Callers

nothing calls this directly

Calls 2

_make_local_repoFunction · 0.90
run_languageFunction · 0.90

Tested by

no test coverage detected