Skip to content

Commit

Permalink
fix test raises
Browse files Browse the repository at this point in the history
  • Loading branch information
htz1992213 committed Feb 5, 2024
1 parent fe7c547 commit d878a1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_mdgopackmol.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_control_params(self, water, ethanol):
input_string = f.read()
assert "maxit 0" in input_string
assert "nloop 0" in input_string
with pytest.raises(ValueError, match="MDAnalysis"):
with pytest.raises(ValueError, match="Packmol failed with 1"):
pw.run_packmol()

def test_timeout(self, water, ethanol):
Expand Down
6 changes: 5 additions & 1 deletion tests/test_msd.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ def test_total_msd(self):
)
assert_allclose(total_builtin_cation[50], 32.14254152556588)
assert_allclose(total_mda_cation[50], 32.338364098424634)
with pytest.raises(ValueError, match="Packmol failed with"):
with pytest.raises(
ValueError,
match="Warning! MDAnalysis does not support subtracting center "
"of mass. Calculating without subtracting...",
):
total_msd(self.gen2, 0, 100, select="type 3", fft=True, built_in=False, center_of_mass=True)


Expand Down

0 comments on commit d878a1c

Please sign in to comment.