Skip to content

Commit

Permalink
Cleanup after switching init conds behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhswenson committed Aug 25, 2024
1 parent d1c7539 commit 06db15a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions paths_cli/tests/commands/test_equilibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def print_test(output_storage, scheme, init_conds, multiplier, extra_steps):
print(isinstance(output_storage, paths.Storage))
print(scheme.__uuid__)
print(init_conds.__uuid__)
print([o.__uuid__ for o in init_conds])
print(multiplier, extra_steps)


Expand All @@ -31,8 +31,10 @@ def test_equilibrate(tps_fixture):
["setup.nc", "-o", "foo.nc"]
)
out_str = "True\n{schemeid}\n{condsid}\n1 0\n"
expected_output = out_str.format(schemeid=scheme.__uuid__,
condsid=init_conds.__uuid__)
expected_output = out_str.format(
schemeid=scheme.__uuid__,
condsid=[o.trajectory.__uuid__ for o in init_conds],
)
assert results.exit_code == 0
assert results.output == expected_output

Expand Down
5 changes: 3 additions & 2 deletions paths_cli/tests/commands/test_pathsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def print_test(output_storage, scheme, init_conds, n_steps):
print(isinstance(output_storage, paths.Storage))
print(scheme.__uuid__)
print(init_conds.__uuid__)
print([traj.__uuid__ for traj in init_conds])
print(n_steps)

@patch('paths_cli.commands.pathsampling.pathsampling_main', print_test)
Expand All @@ -26,7 +26,8 @@ def test_pathsampling(tps_fixture):

results = runner.invoke(pathsampling, ['setup.nc', '-o', 'foo.nc',
'-n', '1000'])
expected_output = (f"True\n{scheme.__uuid__}\n{init_conds.__uuid__}"
initcondsid = [samp.trajectory.__uuid__ for samp in init_conds]
expected_output = (f"True\n{scheme.__uuid__}\n{initcondsid}"
"\n1000\n")

assert results.output == expected_output
Expand Down
1 change: 0 additions & 1 deletion paths_cli/tests/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def test_get_none(self, num_in_file):

st = paths.Storage(filename, mode='r')
obj = INIT_CONDS.get(st, None)
# TODO: fix this for all being trajectories
expected = [
[self.traj],
[s.trajectory for s in self.sample_set],
Expand Down

0 comments on commit 06db15a

Please sign in to comment.