Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolepore committed Jun 25, 2024
1 parent 522afb7 commit 1c4fa72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-emissions_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ test_that("at product level, `NA` in a benchmark yields `NA` in `risk_category`
expect_true(is.na(out$risk_category))
expect_true(is.na(out$profile_ranking))

benchmark <- "tilt_subsector"
benchmark <- aka("tsector")
co2 <- example_products("{ benchmark }" := NA)
out <- emissions_profile(companies, co2) |>
unnest_product() |>
filter(grouped_by == benchmark)
expect_true(is.na(out$risk_category))
expect_true(is.na(out$profile_ranking))

benchmark <- "unit"
benchmark <- aka("xunit")
co2 <- example_products("{ benchmark }" := NA)
out <- emissions_profile(companies, co2) |>
unnest_product() |>
Expand Down Expand Up @@ -94,7 +94,7 @@ test_that("at product level, `NA` in a benchmark yields `NA`s only in the corres
expect_false(is.na(filter(out, clustered == "a")$risk_category))
expect_true(is.na(filter(out, clustered == "b")$risk_category))

benchmark <- "tilt_subsector"
benchmark <- aka("tsector")
co2 <- example_products(
!!aka("uid") := c("a", "b"),
"{ benchmark }" := c("a", NA)
Expand All @@ -107,7 +107,7 @@ test_that("at product level, `NA` in a benchmark yields `NA`s only in the corres
expect_false(is.na(filter(out, clustered == "a")$risk_category))
expect_true(is.na(filter(out, clustered == "b")$risk_category))

benchmark <- "unit"
benchmark <- aka("xunit")
co2 <- example_products(
!!aka("uid") := c("a", "b"),
"{ benchmark }" := c("a", NA)
Expand Down

0 comments on commit 1c4fa72

Please sign in to comment.