Skip to content

Commit 741954e

Browse files
committed
Fix expectedFailurePY3 on 3.4.
1 parent fdefe67 commit 741954e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

future/tests/base.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,7 @@ def _run_test_script(self, filename='mytestscript.py',
308308
def expectedFailurePY3(func):
309309
if not PY3:
310310
return func
311-
@functools.wraps(func)
312-
def wrapper(*args, **kwargs):
313-
try:
314-
func(*args, **kwargs)
315-
except Exception:
316-
raise unittest.case._ExpectedFailure(sys.exc_info())
317-
raise unittest.case._UnexpectedSuccess
318-
return wrapper
311+
return unittest.expectedFailure(func)
319312

320313

321314
def expectedFailurePY26(func):

0 commit comments

Comments
 (0)