tests/testthat/test_get_posterior_distribution.R

context("Testing get_posterior_distribution")

testthat::test_that(desc = "Without",

                    code = {
                      model <- make_model("X -> Y")
                      expect_warning(
                        get_posterior_distribution(model = model),
                        "'get_posterior_distribution' is deprecated."
                      )
                    })

testthat::test_that(desc = "With",

                    code = {
                      model <- make_model("X -> Y") |> update_model()
                      expect_warning(
                        get_posterior_distribution(model = model),
                        "'get_posterior_distribution' is deprecated."
                      )
                    })

Try the CausalQueries package in your browser

Any scripts or data that you put into this service are public.

CausalQueries documentation built on June 22, 2024, 6:50 p.m.