diff --git a/testsuite/MDAnalysisTests/util.py b/testsuite/MDAnalysisTests/util.py index a1493dd4ff..88631bdcff 100644 --- a/testsuite/MDAnalysisTests/util.py +++ b/testsuite/MDAnalysisTests/util.py @@ -233,6 +233,9 @@ def _warn(self, message, category=None, *args, **kwargs): if isinstance(message, Warning): self._captured_categories.append(message.__class__) else: + # as follows Python documentation at + # https://docs.python.org/3/library/warnings.html#warnings.warn + # if category is None, the default UserWarning is used if category is None: category = UserWarning self._captured_categories.append(category)