py.builtin._reraise -> six.reraise
This commit is contained in:
parent
dccac69d82
commit
7099ea9bb0
|
@ -858,7 +858,7 @@ class FixtureDef(object):
|
||||||
if exceptions:
|
if exceptions:
|
||||||
e = exceptions[0]
|
e = exceptions[0]
|
||||||
del exceptions # ensure we don't keep all frames alive because of the traceback
|
del exceptions # ensure we don't keep all frames alive because of the traceback
|
||||||
py.builtin._reraise(*e)
|
six.reraise(*e)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
hook = self._fixturemanager.session.gethookproxy(request.node.fspath)
|
hook = self._fixturemanager.session.gethookproxy(request.node.fspath)
|
||||||
|
@ -885,7 +885,7 @@ class FixtureDef(object):
|
||||||
result, cache_key, err = cached_result
|
result, cache_key, err = cached_result
|
||||||
if my_cache_key == cache_key:
|
if my_cache_key == cache_key:
|
||||||
if err is not None:
|
if err is not None:
|
||||||
py.builtin._reraise(*err)
|
six.reraise(*err)
|
||||||
else:
|
else:
|
||||||
return result
|
return result
|
||||||
# we have a previous but differently parametrized fixture instance
|
# we have a previous but differently parametrized fixture instance
|
||||||
|
|
|
@ -6,7 +6,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
import py
|
import six
|
||||||
from _pytest._code.code import ExceptionInfo
|
from _pytest._code.code import ExceptionInfo
|
||||||
from _pytest.outcomes import skip, Skipped, TEST_OUTCOME
|
from _pytest.outcomes import skip, Skipped, TEST_OUTCOME
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class SetupState(object):
|
||||||
if exc is None:
|
if exc is None:
|
||||||
exc = sys.exc_info()
|
exc = sys.exc_info()
|
||||||
if exc:
|
if exc:
|
||||||
py.builtin._reraise(*exc)
|
six.reraise(*exc)
|
||||||
|
|
||||||
def _teardown_with_finalization(self, colitem):
|
def _teardown_with_finalization(self, colitem):
|
||||||
self._callfinalizers(colitem)
|
self._callfinalizers(colitem)
|
||||||
|
@ -352,7 +352,7 @@ class SetupState(object):
|
||||||
if exc is None:
|
if exc is None:
|
||||||
exc = sys.exc_info()
|
exc = sys.exc_info()
|
||||||
if exc:
|
if exc:
|
||||||
py.builtin._reraise(*exc)
|
six.reraise(*exc)
|
||||||
|
|
||||||
def prepare(self, colitem):
|
def prepare(self, colitem):
|
||||||
""" setup objects along the collector chain to the test-method
|
""" setup objects along the collector chain to the test-method
|
||||||
|
@ -363,7 +363,7 @@ class SetupState(object):
|
||||||
# check if the last collection node has raised an error
|
# check if the last collection node has raised an error
|
||||||
for col in self.stack:
|
for col in self.stack:
|
||||||
if hasattr(col, "_prepare_exc"):
|
if hasattr(col, "_prepare_exc"):
|
||||||
py.builtin._reraise(*col._prepare_exc)
|
six.reraise(*col._prepare_exc)
|
||||||
for col in needed_collectors[len(self.stack) :]:
|
for col in needed_collectors[len(self.stack) :]:
|
||||||
self.stack.append(col)
|
self.stack.append(col)
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -252,7 +252,7 @@ class TestTraceback_f_g_h(object):
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
exc, val, tb = sys.exc_info()
|
exc, val, tb = sys.exc_info()
|
||||||
py.builtin._reraise(exc, val, tb)
|
six.reraise(exc, val, tb)
|
||||||
|
|
||||||
def f(n):
|
def f(n):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue