Skip to content

Commit 72360c8

Browse files
committed
fix: orso tests without optional
1 parent d87c2e8 commit 72360c8

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

tests/orso_test.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77

88
from ess import amor, reflectometry
99
from ess.reflectometry import orso
10-
from ess.reflectometry.types import Filename, SampleRun
10+
from ess.reflectometry.types import Filename, SampleRun, ReferenceRun
1111

1212

1313
def test_build_orso_data_source():
1414
pipeline = sciline.Pipeline(
1515
(*amor.load.providers, *orso.providers),
16-
params={Filename[SampleRun]: amor.data.amor_old_sample_run()},
16+
params={
17+
Filename[SampleRun]: amor.data.amor_old_sample_run(),
18+
Filename[ReferenceRun]: amor.data.amor_old_reference_run()
19+
},
1720
)
21+
pipeline[orso.OrsoInstrument] = None
1822
data_source = pipeline.compute(orso.OrsoDataSource)
1923
expected = fileio.data_source.DataSource(
2024
owner=fileio.base.Person(
@@ -31,21 +35,13 @@ def test_build_orso_data_source():
3135
measurement=fileio.data_source.Measurement(
3236
data_files=[fileio.base.File(file="sample.nxs")],
3337
# We would need the full pipeline to determine this:
34-
additional_files=[],
38+
additional_files=[fileio.File("reference.nxs", comment="supermirror")],
3539
instrument_settings=None,
3640
),
3741
)
3842
assert data_source == expected
3943

4044

41-
def test_build_orso_reduction_without_creator():
42-
pipeline = sciline.Pipeline(orso.providers)
43-
reduction = pipeline.compute(orso.OrsoReduction)
44-
assert reduction.software.name == "ess.reflectometry"
45-
assert reduction.software.version == str(reflectometry.__version__)
46-
assert reduction.creator is None
47-
48-
4945
def test_build_orso_reduction_with_creator():
5046
creator = fileio.base.Person(
5147
name="Erika Mustermann", affiliation="ESS", contact="[email protected]"

0 commit comments

Comments
 (0)