Skip to content

Commit 24a3f6e

Browse files
committed
cleanup tests
1 parent 51e46bd commit 24a3f6e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

tests/testthat/test-utils-get_code_dependency.R

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,6 @@ testthat::describe("get_code with multiple assignments inside an expression", {
8888
})
8989

9090
testthat::describe("get_code with subassignments", {
91-
testthat::it("tracks $ subassignment as producing the base object", {
92-
td <- qenv() |>
93-
within({
94-
iris <- iris
95-
iris$Species[sample.int(nrow(iris), 50)] <- NA
96-
})
97-
98-
code_source <- "iris <- iris\niris$Species[sample.int(nrow(iris), 50)] <- NA"
99-
100-
testthat::expect_equal(get_code(td, names = "iris"), code_source)
101-
})
102-
10391
testthat::it("tracks [ subassignment as producing the base object", {
10492
td <- qenv() |>
10593
within({
@@ -252,7 +240,7 @@ testthat::describe("get_code with subassignments", {
252240
vec[vec %% 2 == 0] <- vec[vec %% 2 == 0] * 2
253241
})
254242

255-
code_source <- "vec <- 1:10\nvec[vec %% 2 == 0] <- vec[vec %% 2 == 0] * 2"
243+
code_source <- "vec <- 1:10\nvec[vec%%2 == 0] <- vec[vec%%2 == 0] * 2"
256244

257245
testthat::expect_equal(get_code(td, names = "vec"), code_source)
258246
})

0 commit comments

Comments
 (0)