diff --git a/modules/dnn/misc/python/test/test_dnn.py b/modules/dnn/misc/python/test/test_dnn.py index 5cafbc531d..58f68856ea 100644 --- a/modules/dnn/misc/python/test/test_dnn.py +++ b/modules/dnn/misc/python/test/test_dnn.py @@ -209,8 +209,10 @@ class dnn_test(NewOpenCVTests): outs.insert(0, netAsync.forwardAsync()) for i in reversed(range(numInputs)): - if outs[i].wait_for(timeout) == 1: + ret = outs[i].wait_for(timeout) + if ret == 1: self.fail("Timeout") + self.assertEqual(ret, 0) # is ready normAssert(self, refs[i], outs[i].get(), 'Index: %d' % i, 1e-10)