Pick the simulator's stage map from a drop-down, and make the QLC+ show optional.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
df05c8ca49
commit
a295fefac0
8 files changed
+154
-20
No files matched your search
@@ -228,3 +228,25 @@ def test_heading_is_stored_in_the_map(tmp_path):
|
||||
by_id = {fixture.id: fixture for fixture in again.fixtures}
|
||||
assert by_id["#1"].direction == 45
|
||||
assert by_id["M1"].zero == -30
|
||||
|
||||
|
||||
def test_switch_stage_lists_and_loads_maps_in_the_same_folder(tmp_path):
|
||||
first = tmp_path / "map.json"
|
||||
first.write_text((ROOT / "stage" / "map.json").read_text())
|
||||
data = json.loads(first.read_text())
|
||||
data["name"] = "movers only"
|
||||
data["fixtures"] = {key: value for key, value in data["fixtures"].items() if key.startswith("M")}
|
||||
(tmp_path / "movers.json").write_text(json.dumps(data))
|
||||
sim = Simulator(load_stage(first), node=None, show=ROOT / "shows" / "xchc.qxw")
|
||||
assert sim.stages() == {"current": "map.json", "stages": ["map.json", "movers.json"]}
|
||||
stage = sim.switch("movers.json")
|
||||
assert stage.name == "movers only"
|
||||
assert stage.show == "xchc.qxw"
|
||||
assert sim.stages()["current"] == "movers.json"
|
||||
for bad in ("../map.json", "missing.json"):
|
||||
try:
|
||||
sim.switch(bad)
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
raise AssertionError(bad)
|
||||
Reference in new issue
Block a user