Skip to content

Commit

Permalink
Fix immutable comaprison of states property.
Browse files Browse the repository at this point in the history
  • Loading branch information
braniii committed Nov 9, 2023
1 parent c98cec9 commit c611954
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]
### Bugfix 🐛:
- Fix mutable properties of `mh.StateTraj` and `mh.LumpedStateTraj`, #43

### Other changes:
- Improved performance of `mh.LumpedStateTraj.microtrajs`


## [1.1.0] - 2023-11-03
Expand Down
6 changes: 2 additions & 4 deletions test/test_statetraj.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,10 @@ def test_nstates(state_traj, statetraj, macro_traj, macrotraj):

def test_states(state_traj):
"""Test immutability of states property."""
states = state_traj.states
states += 2
assert np.testing.assert_array_almost_equal(states - 2, state_traj.states)
assert state_traj.states is not state_traj.states

with pytest.raises(AttributeError):
state_traj.states = states
state_traj.states = state_traj.states


def test_nframes(state_traj):
Expand Down

0 comments on commit c611954

Please sign in to comment.