diff --git a/testsuite/MDAnalysisTests/coordinates/test_xdr.py b/testsuite/MDAnalysisTests/coordinates/test_xdr.py index 908c9be9a8..6f768cd6e1 100644 --- a/testsuite/MDAnalysisTests/coordinates/test_xdr.py +++ b/testsuite/MDAnalysisTests/coordinates/test_xdr.py @@ -903,7 +903,7 @@ def test_persistent_offsets_readonly(self, tmpdir): filename = str(tmpdir.join(os.path.basename(self.filename))) # try to write a offsets file - with (pytest.warns(UserWarning, match="Couldn't save offsets") and + with (pytest.warns(UserWarning, match="Couldn't save offsets") or pytest.warns(UserWarning, match="Cannot write")): self._reader(filename) assert_equal(os.path.exists(XDR.offsets_filename(filename)), False)