Skip to content

Commit

Permalink
Merge pull request #620 from RandomDefaultUser/adding_to_test_suite
Browse files Browse the repository at this point in the history
Fixed LDOS alignment and added it to the test suite
  • Loading branch information
RandomDefaultUser authored Dec 5, 2024
2 parents db881df + 24e5776 commit a7dc2cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
1 change: 0 additions & 1 deletion mala/datahandling/ldos_aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def align_ldos_to_ref(

# shift the ldos
optimal_shift = self.calc_optimal_ldos_shift(
e_grid,
ldos_mean,
ldos_mean_ref,
left_index,
Expand Down
23 changes: 15 additions & 8 deletions test/examples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ def test_advanced_ex06(self, tmp_path):
+ "/../examples/advanced/ex06_distributed_hyperparameter_optimization.py"
)

@pytest.mark.order(after="test_basic_ex01")
def test_advanced_ex09(self, tmp_path):
os.chdir(tmp_path)
runpy.run_path(
self.dir_path
+ "/../examples/advanced/ex10_convert_numpy_openpmd.py"
)

@pytest.mark.skipif(
importlib.util.find_spec("oapackage") is None,
reason="No OAT found on this machine, skipping this " "test.",
Expand All @@ -122,3 +114,18 @@ def test_advanced_ex08(self, tmp_path):
self.dir_path
+ "/../examples/advanced/ex08_visualize_observables.py"
)

@pytest.mark.order(after="test_basic_ex01")
def test_advanced_ex09(self, tmp_path):
os.chdir(tmp_path)
runpy.run_path(
self.dir_path + "/../examples/advanced/ex09_align_ldos.py"
)

@pytest.mark.order(after="test_basic_ex01")
def test_advanced_ex10(self, tmp_path):
os.chdir(tmp_path)
runpy.run_path(
self.dir_path
+ "/../examples/advanced/ex10_convert_numpy_openpmd.py"
)

0 comments on commit a7dc2cb

Please sign in to comment.