Skip to content

Commit 6289cd9

Browse files
committed
Prune
1 parent d25901d commit 6289cd9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/testthat/test-sector_profile.R

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,7 @@ test_that("at company level, two matched and one unmatched products yield `value
128128
expect_equal(sort(other), c(0, 0, 2 / 3))
129129
})
130130

131-
test_that("at product level, when `companies$tilt_sector` doesn't match `scenarios$sector` then `product$grouped_by` is `NA`", {
132-
# This is what I think an analyst would say:
133-
# > A product's tilt_sector with unmatched scenarios's sector yields a "missing benchmark"
134-
#
135-
# Translation to tiltIndicator's code:
136-
# * given: the value "b" of `companies$clustered`
137-
# * when: the corresponding value of `companies$tilt_sector` doesn't match any value of `scenarios$sector`
138-
# * then: the result at product level has the value `NA` in `product$grouped_by`
139-
131+
test_that("at product level, when `companies$sector` doesn't match `scenarios$sector` then `product$grouped_by` is `NA`", {
140132
# Based on this GoogleSheet row:
141133
# https://docs.google.com/spreadsheets/d/16u9WNtVY-yDsq6kHANK3dyYGXTbNQ_Bn/edit#gid=156243064&range=A5:I5
142134
# styler: off
@@ -155,7 +147,7 @@ test_that("at product level, when `companies$tilt_sector` doesn't match `scenari
155147
expect_true(is.na(product$grouped_by))
156148
})
157149

158-
test_that("at product level, when `companies$tilt_sector` doesn't match `scenarios$sector` then `product$risk_category` and `product$profile_ranking` are `NA`", {
150+
test_that("at product level, when `companies$sector` doesn't match `scenarios$sector` then `product$risk_category` and `product$profile_ranking` are `NA`", {
159151
# TODO: DRY with the test above
160152
# styler: off
161153
companies <- tribble(

0 commit comments

Comments
 (0)