Skip to content

Commit 059e4fc

Browse files
committed
Update tests
1 parent 5c23895 commit 059e4fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ensemble_md/tests/test_replica_exchange_EE.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,11 @@ def test_identify_swappable_pairs(self, params_dict):
677677
assert states_for_swap == []
678678

679679
# Case 4: Random Range
680+
REXEE = get_REXEE_instance(params_dict)
680681
REXEE.proposal = 'random_range'
681682
REXEE.state_ranges = [list(range(i, i + 7)) for i in [0, 7, 14, 21]]
682-
states = [[6, 7], [13, 14], [20, 21]]
683-
REXEE = get_REXEE_instance(params_dict)
683+
states = [5, 7, 13, 25]
684+
REXEE.add_swappables = [[6, 7], [13, 14], [20, 21]]
684685
REXEE.n_tot = 28
685686
REXEE.s = 7
686687
REXEE.template['nstdhdl'] = 100
@@ -692,7 +693,7 @@ def test_identify_swappable_pairs(self, params_dict):
692693
]
693694
swappables, swap_index, states_for_swap = REXEE.identify_swappable_pairs(states, REXEE.state_ranges, dhdl_files) # noqa: E501
694695

695-
assert swappables[0] == [0, 1]
696+
assert swappables == [[0, 1]]
696697
assert swap_index[0][0] in [14, 15, 16]
697698
assert swap_index[0][1] in [10, 12, 16, 19]
698699
assert states_for_swap[0] == [6, 7]

0 commit comments

Comments
 (0)