File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -80,15 +80,23 @@ def fuzz_xbox_gamepad(gamepad: wpilib.simulation.XboxControllerSim) -> None:
8080
8181
8282def get_alliance_stations () -> list [str ]:
83+ choices_env_var = "FUZZ_ALLIANCE_STATIONS"
84+ choices_env = os .environ .get (choices_env_var , None )
85+ if choices_env is not None : # pragma: no cover
86+ return choices_env .split ("," )
87+
8388 stations = (1 , 2 , 3 )
8489 if "CI" in os .environ : # pragma: no branch
85- return [
90+ choices = [
8691 f"{ alliance } { station } "
8792 for alliance in ("Blue" , "Red" )
8893 for station in stations
8994 ]
9095 else : # pragma: no cover
91- return [f"Blue{ random .choice (stations )} " , f"Red{ random .choice (stations )} " ]
96+ choices = [f"Blue{ random .choice (stations )} " , f"Red{ random .choice (stations )} " ]
97+
98+ os .environ [choices_env_var ] = "," .join (choices )
99+ return choices
92100
93101
94102@pytest .mark .parametrize ("station" , get_alliance_stations ())
You can’t perform that action at this time.
0 commit comments