diff options
Diffstat (limited to 'tests/functional-tests/common/utils/expectedFailure.py')
-rw-r--r-- | tests/functional-tests/common/utils/expectedFailure.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/functional-tests/common/utils/expectedFailure.py b/tests/functional-tests/common/utils/expectedFailure.py index a496ee21d..8ca7fe330 100644 --- a/tests/functional-tests/common/utils/expectedFailure.py +++ b/tests/functional-tests/common/utils/expectedFailure.py @@ -26,28 +26,9 @@ Write values in tracker and check the actual values are written on the files. Note that these tests are highly platform dependant. """ import sys -import unittest2 as ut -from unittest2.compatibility import wraps +from functools import wraps import configuration as cfg -def expectedFailureBug(bugnumber): - """ - Decorator to mark bugs with ExpectedFailure. In case that a expected failure PASS - it will raise an exception pointing to the Bug number. - - Keep your bugs and tests in sync! - """ - def decorator (func): - @wraps(func) - def wrapper(*args, **kwargs): - try: - func(*args, **kwargs) - except Exception: - raise ut.case._ExpectedFailure(sys.exc_info()) - raise Exception ("Unexpected success. This should fail because of bug " +str(bugnumber)) - return wrapper - return decorator - def expectedFailureJournal(): """ Decorator to handle tests that are expected to fail when journal is disabled. |