Fixing tests for UBUNTU 12.04

parent 89be68e1
......@@ -8,6 +8,7 @@ import bob.learn.boosting.utils
class TestBoosting(unittest.TestCase):
"""Class to test the LUT trainer """
"""
@classmethod
def setUpClass(cls):
# create a single copy of the MNIST database to avoid downloading the packages several times
......@@ -17,12 +18,16 @@ class TestBoosting(unittest.TestCase):
def tearDownClass(cls):
# Clean up the mess that we created
del cls.database
"""
def _data(self, digits = [3, 0], count = 20):
self.database = bob.learn.boosting.utils.MNIST()
# get the data
inputs, targets = [], []
for digit in digits:
input, target = TestBoosting.database.data(labels = digit)
input, target = self.database.data(labels = digit)
inputs.append(input[:count])
targets.append(target[:count])
return numpy.vstack(inputs), numpy.hstack(targets)
......
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