diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-07-05 09:38:47 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-07-05 09:59:07 -0600 |
commit | c80c609950fe5aeecf3082d397c7b5149a834fca (patch) | |
tree | 21664c3a8ce6dff8302db62751b7c2017e37c80a /numpy/testing/decorators.py | |
parent | c2ae6aa0103aecdb5e2a71504583451cada1bfbc (diff) | |
download | numpy-c80c609950fe5aeecf3082d397c7b5149a834fca.tar.gz |
STY: PEP8 fixes for numpy/testing numpy/testing/tests.
Diffstat (limited to 'numpy/testing/decorators.py')
-rw-r--r-- | numpy/testing/decorators.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/testing/decorators.py b/numpy/testing/decorators.py index 8a4cfb480..22026ec42 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) @@ -257,7 +258,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): |