[tracker/sam/functional-tests-quiet: 5/15] functional-tests: Fix brokeness of @expectedFailureJournal decorator



commit f169c8e6acbf11480aeae391bad8f165ca121597
Author: Sam Thursfield <sam afuera me uk>
Date:   Thu Aug 29 18:01:14 2019 +0300

    functional-tests: Fix brokeness of @expectedFailureJournal decorator

 tests/functional-tests/expectedFailure.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/tests/functional-tests/expectedFailure.py b/tests/functional-tests/expectedFailure.py
index 289e0a9df..d3d48b468 100644
--- a/tests/functional-tests/expectedFailure.py
+++ b/tests/functional-tests/expectedFailure.py
@@ -27,6 +27,7 @@ on the files. Note that these tests are highly platform dependant.
 
 from functools import wraps
 import sys
+import unittest as ut
 
 import configuration as cfg
 
@@ -42,11 +43,6 @@ def expectedFailureJournal():
 
         @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 journal is disabled")
+            ut.expectedFailure(func)
         return wrapper
     return decorator


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]