Open sunn-e opened 4 years ago
## if master-master runs
## 2,4 fails
## if dev-master runs
## 1,4 fails
## if dev-dev runs
## 1,3 fails
test_that("1-bddummy master", {
expect_equal(foo_bddummy(1), 2)
})
test_that("2-bddummy dev", {
expect_equal(foo_bddummy(1), 101)
})
test_that("3-bdtest master", {
expect_equal(bdtests::foo(1), 2)
})
test_that("4-bdtest dev", {
expect_equal(bdtests::foo(1), 101)
})
case: bddummy/master + bdtests/dev expected output:
## if master-dev runs
## 2,3 fails
actual output;
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
1/1 mismatches
[1] 2 - 101 == -99
── 2. Failure: 3-bdtest master (@test-foo.R#26) ───────────────────────────────
bdtests::foo(1) not equal to 2.
1/1 mismatches
[1] 101 - 2 == 99
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 3 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
1. Failure: 2-bddummy dev (@test-foo.R#22)
2. Failure: 3-bdtest master (@test-foo.R#26)
Error: testthat unit tests failed
Execution halted
case: bddummy/dev + bdtests/dev
note: the workflow MUST be in the required branch which is dev of bddummy here.
expected output:
## if dev-dev runs
## 1,3 fails
actual output;
> library(testthat)
> library(bddummy)
>
> test_check("bddummy")
── 1. Failure: 1-bddummy master (@test-foo.R#18) ──────────────────────────────
foo_bddummy(1) not equal to 2.
1/1 mismatches
[1] 101 - 2 == 99
── 2. Failure: 3-bdtest master (@test-foo.R#26) ───────────────────────────────
bdtests::foo(1) not equal to 2.
1/1 mismatches
[1] 101 - 2 == 99
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 3 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
1. Failure: 1-bddummy master (@test-foo.R#18)
2. Failure: 3-bdtest master (@test-foo.R#26)
##[error]Error: testthat unit tests failed
Execution halted
Run "dev-dev-ex' workflow on either master or dev . by default we explicitely told to get
/dev
ofbdtests
. That means, master-master and dev-master will either need worflow modification or new workflow altogether. let's see.