mirror of https://github.com/opencv/opencv.git
parent
c9a76ede94
commit
621e3eaed8
3 changed files with 32 additions and 0 deletions
@ -0,0 +1,13 @@ |
||||
#!/usr/bin/env python |
||||
import cv2 as cv |
||||
|
||||
from tests_common import NewOpenCVTests |
||||
|
||||
class knearest_test(NewOpenCVTests): |
||||
def test_load(self): |
||||
k_nearest = cv.ml.KNearest_load(self.find_file("ml/opencv_ml_knn.xml")) |
||||
self.assertFalse(k_nearest.empty()) |
||||
self.assertTrue(k_nearest.isTrained()) |
||||
|
||||
if __name__ == '__main__': |
||||
NewOpenCVTests.bootstrap() |
Loading…
Reference in new issue