test_that("is_exposure_constant", { d1 = data.frame( conc = c(rep(1,3), rep(4,3)), replicate = c(rep("a",3), rep("b",3))) d2 = d1 ; d2$conc[1] = NA d3 = d1 ; d3$conc[1] = d3$conc[1] + 2 expect_true(is_exposure_constant(d1)) expect_false(is_exposure_constant(d2)) expect_false(is_exposure_constant(d3)) expect_true(is_exposure_constant(PRZ_cst)) expect_false(is_exposure_constant(PRZ_var)) })