Skip to content

Commit 81d743c

Browse files
committed
Added a test also on the fixed minimization step
1 parent 1c04f57 commit 81d743c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/test_simple_relax/test_relax_other.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import sscha, sscha.Ensemble
1111
import sscha.SchaMinimizer
12+
import pytest
1213

1314
"""
1415
This test makes a simple relaxation of the sample ensemble
@@ -44,7 +45,9 @@ def test_update_weights(verbose = False):
4445

4546
assert delta_rho < 2e-5
4647

47-
def test_simple_relax(verbose = False):
48+
49+
@pytest.mark.parametrize('fixed', [False, True])
50+
def test_simple_relax(fixed, verbose = False):
4851
total_path = os.path.dirname(os.path.abspath(__file__))
4952
os.chdir(total_path)
5053

@@ -65,6 +68,7 @@ def test_simple_relax(verbose = False):
6568

6669
minim = sscha.SchaMinimizer.SSCHA_Minimizer(ens)
6770
minim.minim_struct = True
71+
minim.fixed_step = fixed
6872
minim.min_step_dyn = 0.5
6973
minim.min_step_struc = 0.5
7074
minim.meaningful_factor = 1e-10
@@ -93,6 +97,7 @@ def test_simple_relax(verbose = False):
9397

9498

9599

100+
96101
if __name__ == "__main__":
97102
test_update_weights(True)
98-
test_simple_relax(True)
103+
test_simple_relax(False, True)

0 commit comments

Comments
 (0)