Commit a7094399 authored by Manuel Günther's avatar Manuel Günther
Browse files

Removed test file that doesn't belong to this package

parent 73a1c0cf
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Wed 14 May 15:41:02 2014 CEST
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
"""Test our Matlab(R) support
"""
import os
import sys
import numpy
import nose.tools
from bob.io.base import load, test_utils
from bob.io.base.test_file import transcode, array_readwrite, arrayset_readwrite
def test_all():
# array writing tests
a1 = numpy.random.normal(size=(2,3)).astype('float32')
a2 = numpy.random.normal(size=(2,3,4)).astype('float64')
a3 = numpy.random.normal(size=(2,3,4,5)).astype('complex128')
a4 = (10 * numpy.random.normal(size=(3,3))).astype('uint64')
array_readwrite('.mat', a1)
array_readwrite(".mat", a2)
array_readwrite('.mat', a3)
array_readwrite(".mat", a4)
# arrayset writing tests
a1 = []
a2 = []
a3 = []
a4 = []
for k in range(10):
a1.append(numpy.random.normal(size=(2,3)).astype('float32'))
a2.append(numpy.random.normal(size=(2,3,4)).astype('float64'))
a3.append(numpy.random.normal(size=(2,3,4,5)).astype('complex128'))
a4.append((10*numpy.random.normal(size=(3,3))).astype('uint64'))
arrayset_readwrite('.mat', a1)
arrayset_readwrite(".mat", a2)
arrayset_readwrite('.mat', a3)
arrayset_readwrite(".mat", a4)
# complete transcoding tests
transcode(test_utils.datafile('test_1d.mat', __name__)) #pseudo 1D - matlab does not support true 1D
transcode(test_utils.datafile('test_2d.mat', __name__))
transcode(test_utils.datafile('test_3d.mat', __name__))
transcode(test_utils.datafile('test_4d.mat', __name__))
transcode(test_utils.datafile('test_1d_cplx.mat', __name__)) #pseudo 1D - matlab does not support 1D
transcode(test_utils.datafile('test_2d_cplx.mat', __name__))
transcode(test_utils.datafile('test_3d_cplx.mat', __name__))
transcode(test_utils.datafile('test_4d_cplx.mat', __name__))
transcode(test_utils.datafile('test.mat', __name__)) #3D complex, large
@nose.tools.nottest
def test_mat_file_io_does_not_crash():
data = load(test_utils.datafile('test_cell.mat', __name__))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment