Skip to content

Commit 240a8ff

Browse files
committed
Run pre-commit cleanup
1 parent 012bbb0 commit 240a8ff

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

envergo/moulinette/tests/test_ep_regime_unique.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def test_ep_ru_aa_only(ep_ru_criterion):
4242
make_hedge(hedge_id="D2", type_haie="alignement"),
4343
]
4444
moulinette = make_moulinette_haie_with_density(
45-
density=60, hedge_data=hedge_data, reimplantation="replantation",
45+
density=60,
46+
hedge_data=hedge_data,
47+
reimplantation="replantation",
4648
)
4749
assert moulinette.ep.ep_regime_unique.result_code == "derogation_inventaire"
4850

@@ -55,7 +57,9 @@ def test_ep_ru_lengths_exclude_alignements(ep_ru_criterion):
5557
make_hedge(hedge_id="D2", type_haie="buissonnante"),
5658
]
5759
moulinette = make_moulinette_haie_with_density(
58-
density=60, hedge_data=hedge_data, reimplantation="replantation",
60+
density=60,
61+
hedge_data=hedge_data,
62+
reimplantation="replantation",
5963
)
6064
# Both hedges use the same default coordinates (~25m), so total_length
6165
# should reflect only the non-AA hedge, not both.
@@ -73,7 +77,9 @@ def test_ep_ru_ripisylve_above_threshold(ep_ru_criterion):
7377
make_hedge(hedge_id="D1", type_haie="buissonnante", ripisylve=True),
7478
]
7579
moulinette = make_moulinette_haie_with_density(
76-
density=60, hedge_data=hedge_data, reimplantation="replantation",
80+
density=60,
81+
hedge_data=hedge_data,
82+
reimplantation="replantation",
7783
)
7884
# Default hedge from COORDS_BIZOUS_INSIDE is ~25m (>20m threshold)
7985
assert moulinette.catalog["ep_ru_ripisylve_length"] > 20
@@ -84,7 +90,8 @@ def test_ep_ru_short_total_dispense(ep_ru_criterion):
8490
"""Total length <= 10m → dispense."""
8591
RUConfigHaieFactory()
8692
moulinette = make_moulinette_haie_with_density(
87-
density=60, hedges=[make_hedge_factory(length=8)],
93+
density=60,
94+
hedges=[make_hedge_factory(length=8)],
8895
reimplantation="replantation",
8996
)
9097
assert moulinette.catalog["ep_ru_total_length"] <= 10
@@ -95,7 +102,8 @@ def test_ep_ru_medium_total_moderate_density(ep_ru_criterion):
95102
"""10m < total <= 100m and density < 80 → derogation_simplifiee."""
96103
RUConfigHaieFactory()
97104
moulinette = make_moulinette_haie_with_density(
98-
density=60, hedges=[make_hedge_factory(length=50)],
105+
density=60,
106+
hedges=[make_hedge_factory(length=50)],
99107
reimplantation="replantation",
100108
)
101109
total = moulinette.catalog["ep_ru_total_length"]
@@ -107,7 +115,8 @@ def test_ep_ru_long_total_low_density(ep_ru_criterion):
107115
"""Total > 100m and density < 50 → derogation_inventaire."""
108116
RUConfigHaieFactory()
109117
moulinette = make_moulinette_haie_with_density(
110-
density=40, hedges=[make_hedge_factory(length=120)],
118+
density=40,
119+
hedges=[make_hedge_factory(length=120)],
111120
reimplantation="replantation",
112121
)
113122
assert moulinette.catalog["ep_ru_total_length"] > 100
@@ -129,7 +138,8 @@ def test_ep_ru_per_hedge_zone_sensible(ep_ru_criterion):
129138
)
130139
# density between D_BAS and D_HAUT so project-level rules don't short-circuit
131140
moulinette = make_moulinette_haie_with_density(
132-
density=65, hedges=[make_hedge_factory(length=120)],
141+
density=65,
142+
hedges=[make_hedge_factory(length=120)],
133143
reimplantation="replantation",
134144
)
135145
assert moulinette.catalog["ep_ru_total_length"] > 100
@@ -140,7 +150,8 @@ def test_ep_ru_per_hedge_high_density_no_zone_sensible(ep_ru_criterion):
140150
"""High density + no zone sensible → dispense via per-hedge."""
141151
RUConfigHaieFactory()
142152
moulinette = make_moulinette_haie_with_density(
143-
density=90, hedges=[make_hedge_factory(length=120)],
153+
density=90,
154+
hedges=[make_hedge_factory(length=120)],
144155
reimplantation="replantation",
145156
)
146157
assert moulinette.catalog["ep_ru_total_length"] > 100
@@ -152,7 +163,8 @@ def test_ep_ru_per_hedge_fallback_derogation_simplifiee(ep_ru_criterion):
152163
RUConfigHaieFactory()
153164
# density between D_BAS and D_HAUT, no zone sensible → fallback
154165
moulinette = make_moulinette_haie_with_density(
155-
density=65, hedges=[make_hedge_factory(length=120)],
166+
density=65,
167+
hedges=[make_hedge_factory(length=120)],
156168
reimplantation="replantation",
157169
)
158170
assert moulinette.catalog["ep_ru_total_length"] > 100
@@ -183,7 +195,8 @@ def test_ep_ru_replantation_coefficient(
183195
"""Replantation coefficient = R_ru + bonus per result level."""
184196
RUConfigHaieFactory()
185197
moulinette = make_moulinette_haie_with_density(
186-
density=density, hedges=[make_hedge_factory(length=length)],
198+
density=density,
199+
hedges=[make_hedge_factory(length=length)],
187200
reimplantation="replantation",
188201
)
189202
criterion = moulinette.ep.ep_regime_unique

0 commit comments

Comments
 (0)