/usr/lib/python2.7/dist-packages/joblib/test/test_numpy_pickle_utils.py is in python-joblib 0.10.3+git55-g660fe5d-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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | import shutil
import os
from tempfile import mkdtemp
from joblib import numpy_pickle_utils
###############################################################################
# Test fixtures
env = dict()
def setup_module():
"""Test setup."""
env['dir'] = mkdtemp()
def teardown_module():
"""Test teardown."""
shutil.rmtree(env['dir'])
def test_binary_zlib_file():
"""Testing creation of files depending on the type of the filenames."""
# Testing str filename.
binary_file = numpy_pickle_utils.BinaryZlibFile(
os.path.join(env['dir'], 'test'),
mode='wb')
binary_file.close()
# Testing unicode filename.
binary_file = numpy_pickle_utils.BinaryZlibFile(
os.path.join(env['dir'], u'test'),
mode='wb')
binary_file.close()
|