python(test): refactor test.py, move test code outside from test.py

This commit is contained in:
Alexander Alekhin
2017-09-03 11:42:55 +00:00
parent 936234d5b1
commit 2f94637899
4 changed files with 199 additions and 162 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env python
from __future__ import print_function
import numpy as np
import cv2
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
def test_inheritance(self):
bm = cv2.StereoBM_create()
bm.getPreFilterCap() # from StereoBM
bm.getBlockSize() # from SteroMatcher
boost = cv2.ml.Boost_create()
boost.getBoostType() # from ml::Boost
boost.getMaxDepth() # from ml::DTrees
boost.isClassifier() # from ml::StatModel
if __name__ == '__main__':
import unittest
unittest.main()