Big-Life-Lab / recodeflow

Harmonizing data into a common format.
https://big-life-lab.github.io/recodeflow/
Other
6 stars 1 forks source link

Error in `file(con, "r")`: cannot open the connection #26

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

Test fails on macOS ppc:

R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> library(testthat)
> library(recodeflow)
> test_check("recodeflow")
[ FAIL 1 | WARN 1 | SKIP 0 | PASS 0 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-integration.R:6:3'): The PMML file is correctly generated ──────
Error in `file(con, "r")`: cannot open the connection
Backtrace:
    ▆
 1. └─base::readLines(expected_pmml_file, file.info(expected_pmml_file)$size) at test-integration.R:6:2
 2.   └─base::file(con, "r")

[ FAIL 1 | WARN 1 | SKIP 0 | PASS 0 ]
Error: Test failures
Execution halted

Also, there should be testthat.R file in ./tests, otherwise tests are simply skipped.

yulric commented 1 year ago

Hey barracuda156,

First of all, I'm sorry for not catching your issue earlier, I didn't receive a notification for it.

Regarding your issue, can you try running it with the command devtools::test()? That's what we use to run our tests.