home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_1987 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-10-31  |  1.8 KB  |  46 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4.  
  5. def slow(t):
  6.     t.slow = True
  7.     return t
  8.  
  9.  
  10. def setastest(tf = True):
  11.     
  12.     def set_test(t):
  13.         t.__test__ = tf
  14.         return t
  15.  
  16.     return set_test
  17.  
  18.  
  19. def skipif(skip_condition = True, msg = None):
  20.     if msg is None:
  21.         msg = 'Test skipped due to test condition'
  22.     
  23.     
  24.     def skip_decorator(f):
  25.         import nose
  26.         
  27.         def skipper(*args, **kwargs):
  28.             if skip_condition:
  29.                 raise nose.SkipTest, msg
  30.             skip_condition
  31.             return f(*args, **kwargs)
  32.  
  33.         return nose.tools.make_decorator(f)(skipper)
  34.  
  35.     return skip_decorator
  36.  
  37.  
  38. def skipknownfailure(f):
  39.     import nose
  40.     
  41.     def skipper(*args, **kwargs):
  42.         raise nose.SkipTest, 'This test is known to fail'
  43.  
  44.     return nose.tools.make_decorator(f)(skipper)
  45.  
  46.