File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 4646 pass
4747finally :
4848 del ctypes
49+
50+
51+ # scipy.sparse uses matrix
52+ # we can't do anything about it, so we silence it until scipy is fixed
53+ import warnings
54+ warnings .filterwarnings (
55+ "ignore" , ".*the matrix subclass.*" , PendingDeprecationWarning )
Original file line number Diff line number Diff line change 11import unittest
2+ import warnings
3+ import os
4+
5+ import scipy .sparse as sp
26
37
48class TestOrange (unittest .TestCase ):
@@ -10,3 +14,16 @@ def test_orange_has_modules(self):
1014 for _ , name , __ in pkgutil .iter_modules (Orange .__path__ ):
1115 if name not in unimported :
1216 self .assertIn (name , Orange .__dict__ )
17+
18+ @unittest .skipUnless (
19+ os .environ .get ("TRAVIS" ),
20+ "Travis has latest versions; Appveyor doesn't, and users don't care" )
21+ def test_remove_matrix_deprecation_filter (self ):
22+ # Override filter in Orange.__init__
23+ warnings .filterwarnings (
24+ "once" , ".*the matrix subclass.*" , PendingDeprecationWarning )
25+ with self .assertWarns (
26+ PendingDeprecationWarning ,
27+ msg = "Remove filter for PendingDeprecationWarning of np.matrix "
28+ "from Orange.__init__" ):
29+ sp .lil_matrix ([1 , 2 , 3 ])
You can’t perform that action at this time.
0 commit comments