def test_good_load(self): cls = ClassFile(self.goodfile) cls.read() self.assertEqual(['cat', 'dog', 'bear'], cls.classes) self.assertEqual(3, cls.number) self.assertTrue(numpy.array_equal(self.labels, cls.labels)) self.assertEqual(5, cls.n_samples)
def test_badfile(self): cls = ClassFile(self.badfile) with self.assertRaises(ValueError): cls.read()