From a35a3eae026f02d837b112135f466f7ec2687c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Thu, 25 Jan 2024 10:09:21 +0100 Subject: [PATCH] More robust tests --- tests/testthat/_snaps/local.md | 14 +++++++------- tests/testthat/test-local.R | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/testthat/_snaps/local.md b/tests/testthat/_snaps/local.md index 667746bf9..bac4374c7 100644 --- a/tests/testthat/_snaps/local.md +++ b/tests/testthat/_snaps/local.md @@ -18,10 +18,10 @@ local_deps_tree(file.path(dld, "pkg4")) Output local::/ - \-pkg2 1.0.0 [new][bld] - \-pkg1 1.0.0 [new][bld] + \-pkg2 1.0.0 [new][bld][dl] () + \-pkg1 1.0.0 [new][bld][dl] () - Key: [new] new | [bld] build + Key: [new] new | [dl] download | [bld] build --- @@ -29,12 +29,12 @@ local_dev_deps_tree(file.path(dld, "pkg4")) Output local::/ - +-pkg2 1.0.0 [new][bld] - | \-pkg1 1.0.0 [new][bld] - \-pkg3 1.0.0 [new][bld] + +-pkg2 1.0.0 [new][bld][dl] () + | \-pkg1 1.0.0 [new][bld][dl] () + \-pkg3 1.0.0 [new][bld][dl] () \-pkg2 - Key: [new] new | [bld] build + Key: [new] new | [dl] download | [bld] build --- diff --git a/tests/testthat/test-local.R b/tests/testthat/test-local.R index 92e64be5e..5694da89b 100644 --- a/tests/testthat/test-local.R +++ b/tests/testthat/test-local.R @@ -2,6 +2,7 @@ test_that("local_install", { skip_on_cran() lib <- withr::local_tempdir() dld <- withr::local_tempdir() + cache_clean() setup_fake_apps() suppressMessages(dl <- pkg_download("pkg3", dld)) @@ -18,6 +19,7 @@ test_that("local_install_deps", { skip_on_cran() lib <- withr::local_tempdir() dld <- withr::local_tempdir() + cache_clean() setup_fake_apps() suppressMessages(dl <- pkg_download("pkg4", dld)) @@ -38,6 +40,7 @@ test_that("local_install_dev_deps", { skip_on_cran() lib <- withr::local_tempdir() dld <- withr::local_tempdir() + cache_clean() setup_fake_apps() suppressMessages(dl <- pkg_download("pkg4", dld)) @@ -58,6 +61,7 @@ test_that("local_deps & co", { skip_on_cran() lib <- withr::local_tempdir() dld <- withr::local_tempdir() + cache_clean() setup_fake_apps() suppressMessages(dl <- pkg_download("pkg4", dld))