Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestFindContoursd mismatch result when opencv installed #1720

Open
KumoLiu opened this issue Jul 12, 2024 · 2 comments
Open

TestFindContoursd mismatch result when opencv installed #1720

KumoLiu opened this issue Jul 12, 2024 · 2 comments

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Jul 12, 2024

_______________________ TestFindContoursd.test_result_0 ________________________

a = (<tests.unit.transform.test_post.TestFindContoursd testMethod=test_result_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)

/usr/local/lib/python3.10/dist-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/unit/transform/test_post.py:121: in test_result
    self.assertEqual(res["result"]["annotation"]["elements"][0]["contours"], expected_output)
E   AssertionError: Lists differ: [[[1, 2], [2, 1], [3, 2], [2, 3]], [[1, 1], [1, 3], [3, 3], [3, 1]]] != [[[3, 4], [1, 4], [0, 3], [0, 1], [1, 0], [3, 0], [4, 1], [4, 3], [3, 4]]]
E   
E   First differing element 0:
E   [[1, 2], [2, 1], [3, 2], [2, 3]]
E   [[3, 4], [1, 4], [0, 3], [0, 1], [1, 0], [3, 0], [4, 1], [4, 3], [3, 4]]
E   
E   First list contains 1 additional elements.
E   First extra element 1:
E   [[1, 1], [1, 3], [3, 3], [3, 1]]
E   
E   - [[[1, 2], [2, 1], [3, 2], [2, 3]], [[1, 1], [1, 3], [3, 3], [3, 1]]]
E   + [[[3, 4], [1, 4], [0, 3], [0, 1], [1, 0], [3, 0], [4, 1], [4, 3], [3, 4]]]

Need to consider the unittest cover the result when opencv installed.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Jul 12, 2024

@tangy5
Copy link
Collaborator

tangy5 commented Jul 29, 2024

Will optimized this unit test, in two cases, with OPENCV, we need additional test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants