Skip to content

Commit

Permalink
add xfail for pytest-dev#2321
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Mar 20, 2017
1 parent 1affc39 commit 434ca5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions _pytest/config.py
Expand Up @@ -926,19 +926,20 @@ def pytest_cmdline_parse(self, pluginmanager, args):
return self

def notify_exception(self, excinfo, option=None):
if option and option.fulltrace:
if getattr(option, 'fulltrace', False):
style = "long"
else:
style = "native"
excrepr = excinfo.getrepr(funcargs=True,
excrepr = excinfo.getrepr(
funcargs=True,
showlocals=getattr(option, 'showlocals', False),
style=style,
)
res = self.hook.pytest_internalerror(excrepr=excrepr,
excinfo=excinfo)
if not py.builtin.any(res):
for line in str(excrepr).split("\n"):
sys.stderr.write("INTERNALERROR> %s\n" %line)
sys.stderr.write("INTERNALERROR> %s\n" % line)
sys.stderr.flush()

def cwd_relative_nodeid(self, nodeid):
Expand Down
4 changes: 3 additions & 1 deletion testing/acceptance_test.py
Expand Up @@ -28,7 +28,9 @@ def test_root_conftest_syntax_error(self, testdir):
result.stderr.fnmatch_lines(["*raise SyntaxError*"])
assert result.ret != 0

def test_early_hook_error_issue38_1(self, testdir):
def test_early_hook_error_issue38_1(self, pytestconfig, testdir):
if getattr(pytestconfig, 'slaveinput', False):
pytest.xfail("xdist breaks exception notification, issue #2321")
testdir.makeconftest("""
def pytest_sessionstart():
0 / 0
Expand Down

0 comments on commit 434ca5c

Please sign in to comment.