Skip to content
Snippets Groups Projects
Commit e3b77675 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Makes sure we can load/save files with arbitrary extensions

parent 8cbe67e3
No related branches found
No related tags found
1 merge request!8Makes sure we can load/save files with arbitrary extensions
Pipeline #
...@@ -101,10 +101,10 @@ def test_can_save(): ...@@ -101,10 +101,10 @@ def test_can_save():
os.unlink(tmp) os.unlink(tmp)
def test_can_save_hdf5(): def run_for_extension(ext):
machine = Machine(HEART_MACHINE) machine = Machine(HEART_MACHINE)
tmp = tempname('.hdf5') tmp = tempname(ext)
machine.save(bob.io.base.HDF5File(tmp, 'w')) machine.save(bob.io.base.HDF5File(tmp, 'w'))
del machine del machine
...@@ -123,6 +123,15 @@ def test_can_save_hdf5(): ...@@ -123,6 +123,15 @@ def test_can_save_hdf5():
os.unlink(tmp) os.unlink(tmp)
def test_can_save_arbitrary():
run_for_extension('.arbitrary')
def test_can_save_h5():
run_for_extension('.h5')
def test_can_save_hdf5():
run_for_extension('.hdf5')
def test_data_loading(): def test_data_loading():
#tests if I can load data in libsvm format using SVMFile #tests if I can load data in libsvm format using SVMFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment