[h5py] 407/455: Fix broken decorator

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 96a636e98a2436cd7840ba425e26855332be15f3
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Wed Feb 10 07:43:55 2010 +0000

    Fix broken decorator
---
 h5py/tests/__init__.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/h5py/tests/__init__.py b/h5py/tests/__init__.py
index 8fb5e3e..6bd1fd7 100644
--- a/h5py/tests/__init__.py
+++ b/h5py/tests/__init__.py
@@ -36,8 +36,6 @@ class _placeholder(object):
 def require(condition=_placeholder, api=None, os=None, unicode=None):
     """ Decorator to enable/disable tests """
     import sys
-    if condition is not _placeholder and not condition:
-        return None
     def haveunicode():
         import os.path
         try:
@@ -46,6 +44,7 @@ def require(condition=_placeholder, api=None, os=None, unicode=None):
             return False
         return True
     def wrap(func):
+        if condition is not _placeholder and not condition: return None
         if unicode and not haveunicode(): return None
         if api == 18 and not config.API_18: return None
         if api == 16 and config.API_18: return None

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list