[Scipy-svn] r6537 - branches/0.8.x/scipy/signal/tests

scipy-svn@scip... scipy-svn@scip...
Fri Jun 18 08:59:30 CDT 2010


Author: rgommers
Date: 2010-06-18 08:59:29 -0500 (Fri, 18 Jun 2010)
New Revision: 6537

Modified:
   branches/0.8.x/scipy/signal/tests/test_ltisys.py
Log:
TST: filter test warning in signal.test_ltisys in 0.8.x branch.

Modified: branches/0.8.x/scipy/signal/tests/test_ltisys.py
===================================================================
--- branches/0.8.x/scipy/signal/tests/test_ltisys.py	2010-06-18 13:37:22 UTC (rev 6536)
+++ branches/0.8.x/scipy/signal/tests/test_ltisys.py	2010-06-18 13:59:29 UTC (rev 6537)
@@ -1,3 +1,5 @@
+import warnings
+
 import numpy as np
 from numpy.testing import assert_almost_equal, assert_equal, run_module_suite
 
@@ -2,2 +4,4 @@
 from scipy.signal.ltisys import ss2tf, lsim2, impulse2, step2, lti
+# import BadCoefficients so we can filter the warning for lsim2.test_05
+from scipy.signal import BadCoefficients
 
@@ -64,6 +68,7 @@
         # This test triggers a "BadCoefficients" warning from scipy.signal.filter_design,
         # but the test passes.  I think the warning is related to the incomplete handling
         # of multi-input systems in scipy.signal.
+        warnings.simplefilter("ignore", BadCoefficients)
 
         # A system with two state variables, two inputs, and one output.
         A = np.array([[-1.0, 0.0], [0.0, -2.0]])



More information about the Scipy-svn mailing list