File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010import sscha , sscha .Ensemble
1111import sscha .SchaMinimizer
12+ import pytest
1213
1314"""
1415This 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+
96101if __name__ == "__main__" :
97102 test_update_weights (True )
98- test_simple_relax (True )
103+ test_simple_relax (False , True )
You can’t perform that action at this time.
0 commit comments