Python wrapper is adapted for cv::String

This commit is contained in:
Andrey Kamaev
2013-03-20 20:42:07 +04:00
parent 2ad7b97f1c
commit 707d3e0a62
4 changed files with 24 additions and 11 deletions

View File

@@ -32,6 +32,19 @@ class NewOpenCVTests(unittest.TestCase):
""" Compute a hash for an image, useful for image comparisons """
return hashlib.md5(im.tostring()).digest()
if sys.version_info[:2] == (2, 6):
def assertLess(self, a, b, msg=None):
if not a < b:
self.fail('%s not less than %s' % (repr(a), repr(b)))
def assertLessEqual(self, a, b, msg=None):
if not a <= b:
self.fail('%s not less than or equal to %s' % (repr(a), repr(b)))
def assertGreater(self, a, b, msg=None):
if not a > b:
self.fail('%s not greater than %s' % (repr(a), repr(b)))
# Tests to run first; check the handful of basic operations that the later tests rely on
class Hackathon244Tests(NewOpenCVTests):