Skip to content

Commit

Permalink
999 change names(teal_data) to ls(get_env(teal_data)) (#1014)
Browse files Browse the repository at this point in the history
This comment was omitted
https://github.com/insightsengineering/teal/pull/1004/files/0596deeb4575a6c0ac6f6c2251054303ccc500fb#r1427716753
during #1004

@kartikeyakirar would you mind reviewing ?

---------

Signed-off-by: Marcin <[email protected]>
Co-authored-by: unknown <[email protected]>
  • Loading branch information
m7pr and kartikeyakirar authored Dec 18, 2023
1 parent fc9ca97 commit 1f0366b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,6 @@ teal_data_datanames <- function(data) {
if (length(teal.data::datanames(data))) {
teal.data::datanames(data)
} else {
names(data@env)
ls(teal.code::get_env(data), all.names = TRUE)
}
}
2 changes: 1 addition & 1 deletion tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test_that("teal_data_datanames returns names of the @env's objects when dataname
iris <- head(iris)
mtcars <- head(mtcars)
})
testthat::expect_equal(teal_data_datanames(teal_data), c("mtcars", "iris"))
testthat::expect_setequal(teal_data_datanames(teal_data), c("mtcars", "iris"))
})

test_that("teal_data_datanames returns datanames which are set by teal.data::datanames", {
Expand Down

0 comments on commit 1f0366b

Please sign in to comment.