Skip to content

Commit

Permalink
another simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Jun 23, 2023
1 parent 8735bfa commit 3037cdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-hub_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3037cdc

Please sign in to comment.