Skip to content

Commit fb70470

Browse files
authored
fix(tests): check that data_path is Path instead of PosixPath to accommodate Windows systems in experiment runinfo type post-measurement tests (#254)
1 parent 923f751 commit fb70470

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/test_measurement/test_experiment/test_experiment_1D.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pyscan as ps
22
import numpy as np
33
import pytest
4-
from pathlib import PosixPath
4+
from pathlib import Path
55
from typing import Callable
66
import re
77

@@ -104,7 +104,7 @@ def test_runinfo_types_post_measure_1D(runinfo, devices):
104104
for key, t in [
105105
('measure_function', Callable),
106106
('scan0', ps.PropertyScan),
107-
('data_path', PosixPath),
107+
('data_path', Path),
108108
('_pyscan_version', str),
109109
('file_name', str)]:
110110
assert hasattr(expt.runinfo, key), 'RunInfo does not have key {}'.format(key)

test/test_measurement/test_experiment/test_experiment_2D.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pyscan as ps
22
import numpy as np
33
import pytest
4-
from pathlib import PosixPath
4+
from pathlib import Path
55
from typing import Callable
66

77

@@ -75,7 +75,7 @@ def test_runinfo_types_post_measure_2D(runinfo, devices):
7575
('measure_function', Callable),
7676
('scan0', ps.PropertyScan),
7777
('scan1', ps.PropertyScan),
78-
('data_path', PosixPath),
78+
('data_path', Path),
7979
('_pyscan_version', str),
8080
('file_name', str)]:
8181

test/test_measurement/test_experiment/test_experiment_3D.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pyscan as ps
22
import numpy as np
33
import pytest
4-
from pathlib import PosixPath
4+
from pathlib import Path
55
from typing import Callable
66

77

@@ -76,7 +76,7 @@ def test_runinfo_types_post_measure_3D(runinfo, devices):
7676
('scan0', ps.PropertyScan),
7777
('scan1', ps.PropertyScan),
7878
('scan2', ps.PropertyScan),
79-
('data_path', PosixPath),
79+
('data_path', Path),
8080
('_pyscan_version', str),
8181
('file_name', str)]:
8282
assert isinstance(expt.runinfo[key], t), 'Value of {} is not {}'.format(key, t)

0 commit comments

Comments
 (0)