| Conditions | 4 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 22 | @pytest.fixture(scope="session", autouse=True) |
||
| 23 | def reference_data(data_dir): |
||
| 24 | """Data fixture of amd.PeriodicSet objects to use in tests.""" |
||
| 25 | |||
| 26 | filenames = ["cubic", "T2_experimental", "CSD_families"] |
||
| 27 | refs = {} |
||
| 28 | for name in filenames: |
||
| 29 | path = str(data_dir / f"{name}.pkl") |
||
| 30 | with open(path, "rb") as f: |
||
| 31 | data = pickle.load(f) |
||
| 32 | if not data: |
||
| 33 | raise ValueError(f"Data not found in path {path}") |
||
| 34 | refs[name] = data |
||
| 35 | return refs |
||
| 36 |