(self, tmp_path)
| 122 | assert names == ["alpha", "cron", "work"] |
| 123 | |
| 124 | def test_persistence(self, tmp_path): |
| 125 | path = tmp_path / "scenes.json" |
| 126 | store1 = SceneStore(path=path) |
| 127 | store1.add(SceneConfig(name="intimate", primary="a/opus", hard_pin=True)) |
| 128 | store1.add(SceneConfig(name="crew", primary="g/flash")) |
| 129 | |
| 130 | # New store instance reads from same file |
| 131 | store2 = SceneStore(path=path) |
| 132 | assert store2.get("intimate") is not None |
| 133 | assert store2.get("intimate").hard_pin is True |
| 134 | assert store2.get("crew") is not None |
| 135 | assert len(store2.list()) == 2 |
| 136 | |
| 137 | def test_add_deduplicates_fallback(self, tmp_path): |
| 138 | store = self._make_store(tmp_path) |
nothing calls this directly
no test coverage detected