def test_count_each_category(self):
     test_set_dir = resource_filename("patent_parsing_tools.utils.tests", "test_set")
     [_, _, categories] = fmatrix.get_test_set_with_categories(test_set_dir)
     cats = {}
     print len(categories)
     for i in categories:
         for j in categories[i]:
             if j in cats:
                 cats[j] += 1
             else:
                 cats[j] = 1
     for i in cats.keys():
         print "category['" + i + "'] = " + str(cats[i])
 def test_get_test_set_with_categories(self):
     test_set_dir = resource_filename("patent_parsing_tools.utils.tests", "test_set")
     [_, matrix, _] = fmatrix.get_test_set_with_categories(test_set_dir)
     self.assertEqual(matrix.shape[0], 100)