[tracker/sam/functional-tests-quiet: 4/18] functional-tests: Fix brokeness of @expectedFailureJournal decorator
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-tests-quiet: 4/18] functional-tests: Fix brokeness of @expectedFailureJournal decorator
- Date: Sat, 14 Sep 2019 10:03:15 +0000 (UTC)
commit 2d9c4449ed908214268e23aa5bf7c77cc2cf8601
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 fe6769569..92d77ce57 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
@@ -38,11 +39,6 @@ def expectedFailureJournal():
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 journal is disabled")
+ ut.expectedFailure(func)
return wrapper
return decorator
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]