home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import os
- import sys
- from IPython.testing.decorators import make_label_dec
-
- def skipif(skip_condition, msg = None):
-
- def skip_decorator(f):
- if msg is None:
- out = 'Test skipped due to test condition.'
- else:
- out = msg
- final_msg = 'Skipping test: %s. %s' % (f.__name__, out)
- if skip_val():
- f.skip = final_msg
-
- return f
-
- return skip_decorator
-
-
- def skip(msg = None):
- return skipif(True, msg)
-
-
- def numpy_not_available():
-
- try:
- import numpy
- np_not_avail = False
- except ImportError:
- np_not_avail = True
-
- return np_not_avail
-
- skip_win32 = skipif(sys.platform == 'win32', 'This test does not run under Windows')
- skip_linux = skipif(sys.platform == 'linux2', 'This test does not run under Linux')
- skip_osx = skipif(sys.platform == 'darwin', 'This test does not run under OS X')
- skip_if_not_win32 = skipif(sys.platform != 'win32', 'This test only runs under Windows')
- skip_if_not_linux = skipif(sys.platform != 'linux2', 'This test only runs under Linux')
- skip_if_not_osx = skipif(sys.platform != 'darwin', 'This test only runs under OSX')
- skipif_not_numpy = skipif(numpy_not_available, 'This test requires numpy')
- skipknownfailure = skip('This test is known to fail')
-