1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
From 87e48c3c54d7a85bc6628c88c1de98ac0469b6fa Mon Sep 17 00:00:00 2001
From: Eric Larson <larson.eric.d@gmail.com>
Date: Tue, 5 Feb 2019 15:30:35 -0500
Subject: [PATCH] FIX: Fix filter check
---
scipy/_lib/tests/test_warnings.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/scipy/_lib/tests/test_warnings.py
+++ b/scipy/_lib/tests/test_warnings.py
@@ -7,6 +7,7 @@
from __future__ import division, absolute_import, print_function
+import os
import sys
import scipy
@@ -69,7 +70,7 @@
bad_filters = []
bad_stacklevels = []
-
+
for path in base.rglob("*.py"):
# use tokenize to auto-detect encoding on systems where no
# default encoding is defined (e.g. LANG='C')
@@ -92,6 +93,10 @@
# this is one that should be fixed and this removed then.
bad_filters = [item for item in bad_filters
if 'optimize.py' not in item]
+ # The filterwarnings calls in sparse are needed.
+ bad_filters = [item for item in bad_filters
+ if os.path.join('sparse', '__init__.py') not in item
+ and os.path.join('sparse', 'sputils.py') not in item]
if bad_filters:
raise AssertionError(
|