| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import pytest |
||
| 2 | import os |
||
| 3 | import pickle |
||
| 4 | |||
| 5 | |||
| 6 | @pytest.fixture(scope='session', autouse=True) |
||
| 7 | def root_dir(): |
||
| 8 | return r'tests\data' |
||
| 9 | |||
| 10 | |||
| 11 | @pytest.fixture(scope='session', autouse=True) |
||
| 12 | def reference_data(root_dir): |
||
| 13 | |||
| 14 | filenames = { # .pkl files with PeriodicSets. |
||
| 15 | 'cubic': 'cubic', |
||
| 16 | 'T2_experimental': 'T2_experimental', |
||
| 17 | 'CSD_families': 'CSD_families', |
||
| 18 | } |
||
| 19 | |||
| 20 | refs = {} |
||
| 21 | for name in filenames: |
||
| 22 | with open(os.path.join(root_dir, filenames[name] + '.pkl'), 'rb') as f: |
||
| 23 | refs[name] = pickle.load(f) |
||
| 24 | |||
| 25 | return refs |
||
| 26 |