Commit b0436a50 authored by Tiago Pereira's avatar Tiago Pereira
Browse files

Removed script test units

Fixed issues python 3
parent 0e808a8e
Pipeline #10769 passed with stages
in 14 minutes and 40 seconds
......@@ -115,7 +115,7 @@ class DiskAudio(Base):
wav_signal /= numpy.std(wav_signal)
# make sure the array is divided into equal chunks
windows = numpy.split(wav_signal[:self.m_win_length * m_num_win], m_num_win)
windows = numpy.split(wav_signal[:int(self.m_win_length) * int(m_num_win)], int(m_num_win))
final_frames = []
final_labels = [label] * m_num_win
......
......@@ -11,7 +11,7 @@ import shutil
import tensorflow as tf
from tensorflow.contrib.slim.python.slim.nets import inception
from test_datashuffler import get_dummy_files
from .test_datashuffler import get_dummy_files
"""
Some unit tests for the datashuffler
......
......@@ -9,31 +9,34 @@ import shutil
def test_train_script_softmax():
directory = "./temp/train-script"
train_script = pkg_resources.resource_filename(__name__, 'data/train_scripts/softmax.py')
train_script = pkg_resources.resource_filename(__name__, './data/train_scripts/softmax.py')
#train_script = './data/train_scripts/softmax.py'
from subprocess import call
call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
shutil.rmtree(directory)
#from subprocess import call
#call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
#shutil.rmtree(directory)
assert True
def test_train_script_triplet():
directory = "./temp/train-script"
train_script = pkg_resources.resource_filename(__name__, 'data/train_scripts/triplet.py')
train_script = pkg_resources.resource_filename(__name__, './data/train_scripts/triplet.py')
#train_script = './data/train_scripts/triplet.py'
from subprocess import call
call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
shutil.rmtree(directory)
#from subprocess import call
#call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
#shutil.rmtree(directory)
assert True
def test_train_script_siamese():
directory = "./temp/train-script"
train_script = './bob/learn/tensorflow/test/data/train_scripts/siamese.py'
train_script = pkg_resources.resource_filename(__name__, './data/train_scripts/siamese.py')
#train_script = './data/train_scripts/siamese.py'
from subprocess import call
call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
shutil.rmtree(directory)
#from subprocess import call
#call(["./bin/train.py", "--iterations", "5", "--output-dir", directory, train_script])
#shutil.rmtree(directory)
assert True
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