Skip to content

Commit 379d128

Browse files
committed
Make sure that warning is always triggered.
1 parent 17c40aa commit 379d128

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/tests/test_mlab.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,7 @@ def test_specgram_phase(self):
21072107
def test_specgram_warn_only1seg(self):
21082108
"""Warning should be raised if len(x) <= NFFT. """
21092109
with warnings.catch_warnings(record=True) as w:
2110+
warnings.simplefilter("always", category=UserWarning)
21102111
mlab.specgram(x=self.y, NFFT=len(self.y), Fs=self.Fs)
21112112
assert len(w) == 1
21122113
assert issubclass(w[0].category, UserWarning)

0 commit comments

Comments
 (0)