Skip to content

Commit 591953d

Browse files
committed
Format corporate land files
1 parent 2ffa4e6 commit 591953d

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

policyengine_uk/tests/test_corporate_land_value.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ def test_corporate_land_value_matches_aggregate_for_weighted_dataset():
3131
corporate_land_value = sim.calculate(
3232
"corporate_land_value", map_to="household", period=2025
3333
)
34-
household_weight = sim.calculate("household_weight", map_to="household", period=2025)
35-
aggregate = (
36-
sim.tax_benefit_system.parameters("2025")
37-
.household.wealth.land.value.aggregate_corporate_land_value
34+
household_weight = sim.calculate(
35+
"household_weight", map_to="household", period=2025
3836
)
37+
aggregate = sim.tax_benefit_system.parameters(
38+
"2025"
39+
).household.wealth.land.value.aggregate_corporate_land_value
3940

4041
assert corporate_land_value[0] == pytest.approx(aggregate * 0.2)
4142
assert corporate_land_value[1] == pytest.approx(aggregate * 0.6)

policyengine_uk/variables/household/wealth/corporate_land_value.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def formula(household, period, parameters):
1717
if total_weighted_corporate_wealth == 0:
1818
return corporate_wealth * 0
1919

20-
aggregate_corporate_land_value = (
21-
parameters(period).household.wealth.land.value.aggregate_corporate_land_value
22-
)
20+
aggregate_corporate_land_value = parameters(
21+
period
22+
).household.wealth.land.value.aggregate_corporate_land_value
2323
return (
2424
corporate_wealth
2525
/ total_weighted_corporate_wealth

0 commit comments

Comments
 (0)