Skip to content

Commit 69f797b

Browse files
author
Ben Cipollini
committed
Unlike numpy, default to record=True (this is what we had before).
1 parent d6dfc7f commit 69f797b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nibabel/testing/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ class clear_and_catch_warnings(warnings.catch_warnings):
8383
returned by the context manager. Otherwise None is returned by the
8484
context manager. The objects appended to the list are arguments whose
8585
attributes mirror the arguments to ``showwarning()``.
86+
87+
NOTE: nibabel difference from numpy: default is True
88+
8689
modules : sequence, optional
8790
Sequence of modules for which to reset warnings registry on entry and
8891
restore on exit
@@ -96,7 +99,7 @@ class clear_and_catch_warnings(warnings.catch_warnings):
9699
"""
97100
class_modules = ()
98101

99-
def __init__(self, record=False, modules=()):
102+
def __init__(self, record=True, modules=()):
100103
self.modules = set(modules).union(self.class_modules)
101104
self._warnreg_copies = {}
102105
super(clear_and_catch_warnings, self).__init__(record=record)

0 commit comments

Comments
 (0)