Skip to content

Commit 92ab8cf

Browse files
committed
Corrects a failing test to conform to new code
1 parent ad0fc4a commit 92ab8cf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/structure_function_tests.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,27 @@ def test_str_cli_generator():
2929
k_val = 4
3030
outfile = "str_K4_rep1"
3131
arg.params = None
32+
seed = None
3233

3334
mock_cli = ["EP", "-K", str(k_val), "-i", "IF", "-o", outfile]
34-
returned_cli, returned_outfile = sw.str_cli_generator(arg, k_val, 1)
35+
returned_cli, returned_outfile = sw.str_cli_generator(arg, k_val, 1, seed)
3536

3637
assert returned_cli == mock_cli
3738
assert returned_outfile == outfile
3839

40+
# Add a seed to the test
41+
seed = "1234"
42+
mock_cli += ["-D", "1234"]
43+
returned_cli, returned_outfile = sw.str_cli_generator(arg, k_val, 1, seed)
44+
45+
assert returned_cli == mock_cli
46+
assert returned_outfile == outfile
47+
48+
# Add an argument to the test
3949
arg.params = "test"
4050

4151
mock_cli += arg.params
42-
returned_cli, returned_outfile = sw.str_cli_generator(arg, k_val, 1)
52+
returned_cli, returned_outfile = sw.str_cli_generator(arg, k_val, 1, seed)
4353

4454
assert returned_cli == mock_cli
4555
assert returned_outfile == outfile

0 commit comments

Comments
 (0)