Commit 5471f1c 1 parent f5326ee commit 5471f1c Copy full SHA for 5471f1c
File tree 1 file changed +17
-5
lines changed
tests/test_config_parsing
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,24 @@ def test_default_model_config_ens_path(tmpdir):
45
45
46
46
47
47
def test_default_model_config_run_path (tmpdir ):
48
- assert (
49
- ModelConfig (
50
- num_realizations = 1 ,
51
- ).runpath_format_string
52
- == "simulations/realization-%d/iter-%d"
48
+ mc = ModelConfig (num_realizations = 1 )
49
+ assert mc .runpath_format_string == "simulations/realization-<IENS>/iter-<ITER>"
50
+ assert mc .is_valid_runpath () == True
51
+
52
+
53
+ def test_invalid_model_config_run_path (tmpdir ):
54
+ mc = ModelConfig (
55
+ num_realizations = 1 , runpath_format_string = "realization-no-specifier"
53
56
)
57
+ assert mc .runpath_format_string == None
58
+ assert mc .is_valid_runpath () == False
59
+
60
+
61
+ def test_deprecated_model_config_run_path (tmpdir ):
62
+ runpath = "simulations/realization-%d/iter-%d"
63
+ mc = ModelConfig (num_realizations = 1 , runpath_format_string = runpath )
64
+ assert mc .runpath_format_string == runpath
65
+ assert mc .is_valid_runpath () == True
54
66
55
67
56
68
@given (config_generators ())
You can’t perform that action at this time.
0 commit comments