From 3037cdce27ee42a12f0b1d66a2911b752fc8022b Mon Sep 17 00:00:00 2001 From: Daniel Falbel Date: Fri, 23 Jun 2023 11:06:44 +0200 Subject: [PATCH] another simplification --- tests/testthat/test-hub_download.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-hub_download.R b/tests/testthat/test-hub_download.R index 63f7636..2f22f27 100644 --- a/tests/testthat/test-hub_download.R +++ b/tests/testthat/test-hub_download.R @@ -4,17 +4,17 @@ test_that("hub_download", { file <- hub_download("gpt2", filename = "config.json") expect_equal( - jsonlite::fromJSON(fs::link_path(file))$architectures, + jsonlite::fromJSON(file)$architectures, "GPT2LMHeadModel" ) - file <- file(hub_download("gpt2", filename = "config.json", force_download = TRUE)) + file <- hub_download("gpt2", filename = "config.json", force_download = TRUE) expect_equal( jsonlite::fromJSON(file)$architectures, "GPT2LMHeadModel" ) - file <- file(hub_download("gpt2", filename = "config.json", local_files_only = TRUE)) + file <- hub_download("gpt2", filename = "config.json", local_files_only = TRUE) expect_equal( jsonlite::fromJSON(file)$architectures, "GPT2LMHeadModel"