avocado.core.exceptions: Make TestFail to inherit from AssertionError

Unittests only consider exceptions derived from AssertionError
to be actual failures. Although TestFail is more of a generic
'this test failed' kind of thing, for all intents and purposes
it doesn't impact the rest of avocado. So, let's make the change.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 dbb90ad3
......@@ -130,10 +130,14 @@ class TestNAError(TestBaseException):
status = "TEST_NA"
class TestFail(TestBaseException):
class TestFail(TestBaseException, AssertionError):
"""
Indicates that the test failed. The test job will continue, though.
Indicates that the test failed.
TestFail inherits from AssertionError in order to keep compatibility
with vanilla python unittests (they only consider failures the ones
deriving from AssertionError).
"""
status = "FAIL"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册