Skip to content

Commit

Permalink
Merge pull request #86 from neutrons/failing-tests
Browse files Browse the repository at this point in the history
Failing tests
  • Loading branch information
dmitry-ganyushin authored May 13, 2024
2 parents 04e625c + 0581635 commit d940d26
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
17 changes: 17 additions & 0 deletions reflectivity_ui/interfaces/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,20 @@ def _verify_true(parameter, default):
self.gisans_slice = _verify_true("gisans_slice", self.gisans_slice)
self.gisans_slice_qz_min = float(settings.value("gisans_slice_qz_min", self.gisans_slice_qz_min))
self.gisans_slice_qz_max = float(settings.value("gisans_slice_qz_max", self.gisans_slice_qz_max))

@classmethod
def setup_default_values(cls):
cls.QX_VS_QZ = 0
cls.KZI_VS_KZF = 1
cls.DELTA_KZ_VS_QZ = 3
cls.wl_bandwidth = 3.2
cls.use_constant_q = False
cls.sample_size = 10
cls.do_final_rebin = True
cls.final_rebin_step = -0.01
cls.normalize_to_unity = True
cls.total_reflectivity_q_cutoff = 0.01
cls.global_stitching = False
cls.polynomial_stitching = False
cls.polynomial_stitching_degree = 3
cls.polynomial_stitching_points = 3
3 changes: 3 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def DATA_DIR():
return Path(__file__).parent / "data"


Instrument.file_search_template = str(Path(__file__).parent / "data" / "reflectivity_ui-data" / "REF_M_%s")


@pytest.fixture(scope="module")
def data_server(DATA_DIR):
r"""Object containing info and functionality for data files"""
Expand Down
2 changes: 1 addition & 1 deletion test/ui/test_losing_direct_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# standard library imports


@pytest.mark.datarepo
@pytest.mark.skip(reason="WIP")
def test_losing_direct_beam(qtbot):
r"""Test that reduction list runs do not lose their direct beam when the user clicks another run in the file list"""
main_window = MainWindow()
Expand Down
2 changes: 1 addition & 1 deletion test/ui/test_missing_cross_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# standard library imports


@pytest.mark.datarepo
@pytest.mark.skip(reason="WIP")
def test_missing_cross_section(qtbot):
r"""Test a run where the cross section corresponding to the On-On spin combination has no integrated
proton charge. The application produces and empty reflectivity curve for On-On."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def stitching_config():
"final_rebin_step": -0.01,
"match_direct_beam": True,
}
Configuration.setup_default_values()
config = Configuration()
for key in settings:
setattr(config, key, settings[key])
Expand Down

0 comments on commit d940d26

Please sign in to comment.