/usr/share/pyshared/nipype/testing/utils.py is in python-nipype 0.9.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Additional handy utilities for testing
"""
__docformat__ = 'restructuredtext'
from ..utils.misc import package_check
from nose import SkipTest
def skip_if_no_package(*args, **kwargs):
"""Raise SkipTest if package_check fails
Parameters
----------
*args Positional parameters passed to `package_check`
*kwargs Keyword parameters passed to `package_check`
"""
package_check(exc_failed_import=SkipTest,
exc_failed_check=SkipTest,
*args, **kwargs)
|