Python numpy.testing.dec.skipif() Examples
The following are 4
code examples of numpy.testing.dec.skipif().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
numpy.testing.dec
, or try the search function
.
Example #1
Source File: test_mpmath.py From Computable with MIT License | 5 votes |
def mpmath_check(min_ver): if mpmath is None: return dec.skipif(True, "mpmath is not installed") return dec.skipif(LooseVersion(mpmath.__version__) < LooseVersion(min_ver), "mpmath version >= %s required" % min_ver) #------------------------------------------------------------------------------ # expi #------------------------------------------------------------------------------
Example #2
Source File: test_mpmath.py From Computable with MIT License | 5 votes |
def nonfunctional_tooslow(func): return dec.skipif(True, " Test not yet functional (too slow), needs more work.")(func)
Example #3
Source File: _mptestutils.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def nonfunctional_tooslow(func): return dec.skipif(True, " Test not yet functional (too slow), needs more work.")(func) # ------------------------------------------------------------------------------ # Tools for dealing with mpmath quirks # ------------------------------------------------------------------------------
Example #4
Source File: _testutils.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def check_version(module, min_ver): if type(module) == MissingModule: return dec.skipif(True, "{} is not installed".format(module.name)) return dec.skipif(LooseVersion(module.__version__) < LooseVersion(min_ver), "{} version >= {} required".format(module.__name__, min_ver)) #------------------------------------------------------------------------------ # Metaclass for decorating test_* methods #------------------------------------------------------------------------------