python(test): enable pylint checks for tests

This commit is contained in:
Alexander Alekhin
2017-09-03 11:17:15 +00:00
parent e1b102e9a6
commit 936234d5b1
20 changed files with 50 additions and 57 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ def make_gaussians(cluster_n, img_size):
points = []
ref_distrs = []
sizes = []
for i in xrange(cluster_n):
for _ in xrange(cluster_n):
mean = (0.1 + 0.8*random.rand(2)) * img_size
a = (random.rand(2, 2)-0.5)*img_size*0.1
cov = np.dot(a.T, a) + img_size*0.05*np.eye(2)
@@ -59,7 +59,7 @@ class kmeans_test(NewOpenCVTests):
points, _, clusterSizes = make_gaussians(cluster_n, img_size)
term_crit = (cv2.TERM_CRITERIA_EPS, 30, 0.1)
ret, labels, centers = cv2.kmeans(points, cluster_n, None, term_crit, 10, 0)
_ret, labels, centers = cv2.kmeans(points, cluster_n, None, term_crit, 10, 0)
self.assertEqual(len(centers), cluster_n)