[Scipy-svn] r3842 - in trunk/scipy: linsolve/umfpack/tests misc/tests stats testing
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jan 16 08:15:39 EST 2008
Author: matthew.brett at gmail.com
Date: 2008-01-16 07:15:30 -0600 (Wed, 16 Jan 2008)
New Revision: 3842
Modified:
trunk/scipy/linsolve/umfpack/tests/test_umfpack.py
trunk/scipy/misc/tests/test_pilutil.py
trunk/scipy/stats/morestats.py
trunk/scipy/testing/decorators.py
Log:
Renamed test setting decorator, cleaned up test disabling for umfpack
Modified: trunk/scipy/linsolve/umfpack/tests/test_umfpack.py
===================================================================
--- trunk/scipy/linsolve/umfpack/tests/test_umfpack.py 2008-01-16 12:27:45 UTC (rev 3841)
+++ trunk/scipy/linsolve/umfpack/tests/test_umfpack.py 2008-01-16 13:15:30 UTC (rev 3842)
@@ -17,13 +17,11 @@
import scipy.linsolve.umfpack as um
# Allow disabling of nose tests if umfpack not present
-have_umfpack = um.umfpack._um is not None
+TestCase.__test__ = um.umfpack._um is not None
class TestSolvers(TestCase):
"""Tests inverting a sparse linear system"""
- __test__ = have_umfpack
-
def test_solve_complex_without_umfpack(self):
"""Solve: single precision complex"""
linsolve.use_solver( useUmfpack = False )
@@ -110,8 +108,6 @@
class TestFactorization(TestCase):
"""Tests factorizing a sparse linear system"""
- __test__ = have_umfpack
-
def test_complex_lu(self):
"""Getting factors of complex matrix"""
umfpack = um.UmfpackContext("zi")
Modified: trunk/scipy/misc/tests/test_pilutil.py
===================================================================
--- trunk/scipy/misc/tests/test_pilutil.py 2008-01-16 12:27:45 UTC (rev 3841)
+++ trunk/scipy/misc/tests/test_pilutil.py 2008-01-16 13:15:30 UTC (rev 3842)
@@ -36,7 +36,7 @@
assert img.min() >= imin
assert img.max() <= imax
- at dec.is_nosetest(_have_PIL)
+ at dec.setastest(_have_PIL)
def test_fromimage():
''' Test generator for parametric tests '''
data = {'icon.png':(0,255),
Modified: trunk/scipy/stats/morestats.py
===================================================================
--- trunk/scipy/stats/morestats.py 2008-01-16 12:27:45 UTC (rev 3841)
+++ trunk/scipy/stats/morestats.py 2008-01-16 13:15:30 UTC (rev 3842)
@@ -17,7 +17,7 @@
import scipy.special as special
import futil
import numpy as sb
-from scipy.testing.decorators import is_nosetest
+from scipy.testing.decorators import setastest
__all__ = ['find_repeats',
'bayes_mvs', 'kstat', 'kstatvar', 'probplot', 'ppcc_max', 'ppcc_plot',
@@ -770,7 +770,7 @@
pval = distributions.f.sf(W,k-1,Ntot-k) # 1 - cdf
return W, pval
- at is_nosetest(False)
+ at setastest(False)
def binom_test(x,n=None,p=0.5):
"""An exact (two-sided) test of the null hypothesis that the
probability of success in a Bernoulli experiment is p.
Modified: trunk/scipy/testing/decorators.py
===================================================================
--- trunk/scipy/testing/decorators.py 2008-01-16 12:27:45 UTC (rev 3841)
+++ trunk/scipy/testing/decorators.py 2008-01-16 13:15:30 UTC (rev 3842)
@@ -27,11 +27,11 @@
t.willfail = True
return t
-def is_nosetest(tf):
+def setastest(tf=True):
''' Signals to nose that this function is or is not a test
-
+
e.g
- >>> @is_nosetest(False)
+ >>> @setastest(False)
>>> def func_with_test_in_name(arg1, arg2): pass
...
>>>
More information about the Scipy-svn
mailing list