()
| 23 | |
| 24 | |
| 25 | def test_from_json_file(): |
| 26 | data = {"name": "from_file", "value": 42} |
| 27 | with tempfile.NamedTemporaryFile(mode="w+", delete=False, suffix=".json") as tmp: |
| 28 | json.dump(data, tmp) |
| 29 | tmp_path = tmp.name |
| 30 | |
| 31 | config = DummyConfig.from_json_file(tmp_path) |
| 32 | assert config.name == "from_file" |
| 33 | assert config.value == 42 |
| 34 | os.remove(tmp_path) |
| 35 | |
| 36 | |
| 37 | def test_to_json_file(): |
nothing calls this directly
no test coverage detected