/usr/share/pyshared/joblib/test/common.py is in python-joblib 0.7.1-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 22 | """
Small utilities for testing.
"""
import nose
# A decorator to run tests only when numpy is available
try:
import numpy as np
def with_numpy(func):
""" A decorator to skip tests requiring numpy.
"""
return func
except ImportError:
def with_numpy(func):
""" A decorator to skip tests requiring numpy.
"""
def my_func():
raise nose.SkipTest('Test requires numpy')
return my_func
np = None
|