diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2015-07-12 00:29:34 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2015-07-12 00:29:34 +0200 |
commit | ddc53885e1b66b6e4e7d299d2c808ddc472913b9 (patch) | |
tree | 0a6eb451c9d79a0a3b77f2387e31bb1486b4578d /numpy/testing/decorators.py | |
parent | 57e6b4b1de8c50641119b3f11ba62e660eece95a (diff) | |
parent | ad40c230c4da2ca336bed6b093e8efaba590eec3 (diff) | |
download | numpy-ddc53885e1b66b6e4e7d299d2c808ddc472913b9.tar.gz |
Merge pull request #6049 from charris/pep8-numpy-testing
PEP8 and pyflakes fixups for numpy/testing and numpy/testing/tests
Diffstat (limited to 'numpy/testing/decorators.py')
-rw-r--r-- | numpy/testing/decorators.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/testing/decorators.py b/numpy/testing/decorators.py index 8a4cfb480..56962b93c 100644 --- a/numpy/testing/decorators.py +++ b/numpy/testing/decorators.py @@ -123,9 +123,9 @@ def skipif(skip_condition, msg=None): # Allow for both boolean or callable skip conditions. if isinstance(skip_condition, collections.Callable): - skip_val = lambda : skip_condition() + skip_val = lambda: skip_condition() else: - skip_val = lambda : skip_condition + skip_val = lambda: skip_condition def get_msg(func,msg=None): """Skip message with information about function being skipped.""" @@ -199,15 +199,16 @@ def knownfailureif(fail_condition, msg=None): # Allow for both boolean or callable known failure conditions. if isinstance(fail_condition, collections.Callable): - fail_val = lambda : fail_condition() + fail_val = lambda: fail_condition() else: - fail_val = lambda : fail_condition + fail_val = lambda: fail_condition def knownfail_decorator(f): # Local import to avoid a hard nose dependency and only incur the # import time overhead at actual test-time. import nose from .noseclasses import KnownFailureTest + def knownfailer(*args, **kwargs): if fail_val(): raise KnownFailureTest(msg) @@ -246,7 +247,6 @@ def deprecated(conditional=True): # Local import to avoid a hard nose dependency and only incur the # import time overhead at actual test-time. import nose - from .noseclasses import KnownFailureTest def _deprecated_imp(*args, **kwargs): # Poor man's replacement for the with statement @@ -257,7 +257,7 @@ def deprecated(conditional=True): raise AssertionError("No warning raised when calling %s" % f.__name__) if not l[0].category is DeprecationWarning: - raise AssertionError("First warning for %s is not a " \ + raise AssertionError("First warning for %s is not a " "DeprecationWarning( is %s)" % (f.__name__, l[0])) if isinstance(conditional, collections.Callable): |