mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 18:39:12 +08:00
49 lines
1.2 KiB
Python
49 lines
1.2 KiB
Python
|
#!/usr/bin/env python
|
||
|
|
||
|
import numpy as np
|
||
|
import cv2 as cv
|
||
|
import os
|
||
|
import sys
|
||
|
import unittest
|
||
|
|
||
|
from tests_common import NewOpenCVTests
|
||
|
|
||
|
|
||
|
try:
|
||
|
|
||
|
if sys.version_info[:2] < (3, 0):
|
||
|
raise unittest.SkipTest('Python 2.x is not supported')
|
||
|
|
||
|
class gapi_kernels_test(NewOpenCVTests):
|
||
|
|
||
|
def test_fluid_core_package(self):
|
||
|
fluid_core = cv.gapi.core.fluid.kernels()
|
||
|
self.assertLess(0, fluid_core.size())
|
||
|
|
||
|
def test_fluid_imgproc_package(self):
|
||
|
fluid_imgproc = cv.gapi.imgproc.fluid.kernels()
|
||
|
self.assertLess(0, fluid_imgproc.size())
|
||
|
|
||
|
def test_combine(self):
|
||
|
fluid_core = cv.gapi.core.fluid.kernels()
|
||
|
fluid_imgproc = cv.gapi.imgproc.fluid.kernels()
|
||
|
fluid = cv.gapi.combine(fluid_core, fluid_imgproc)
|
||
|
self.assertEqual(fluid_core.size() + fluid_imgproc.size(), fluid.size())
|
||
|
|
||
|
except unittest.SkipTest as e:
|
||
|
|
||
|
message = str(e)
|
||
|
|
||
|
class TestSkip(unittest.TestCase):
|
||
|
def setUp(self):
|
||
|
self.skipTest('Skip tests: ' + message)
|
||
|
|
||
|
def test_skip():
|
||
|
pass
|
||
|
|
||
|
pass
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
NewOpenCVTests.bootstrap()
|