From c3ba9225ef5f04371fc7da222b50c55e274c42a5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 26 Oct 2017 21:33:36 -0200 Subject: [PATCH 1/2] Change directory for py27 xdist-related envs The "filter_traceback" function was not filtering the frames that belonged to the pytest internals. "filter_traceback" was receiving *relative* paths when running with xdist, and full paths in non-distributed runs; for this reason the traceback function did not consider the received path to be relative to the pytest internal modules. Fix #2843 --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 33e5fa02c..e9c1dfa96 100644 --- a/tox.ini +++ b/tox.ini @@ -64,8 +64,9 @@ deps = mock nose hypothesis>=3.5.2 +changedir=testing commands = - pytest -n1 -rfsxX {posargs:testing} + pytest -n1 -rfsxX {posargs:.} [testenv:py36-xdist] deps = {[testenv:py27-xdist]deps} @@ -91,10 +92,11 @@ deps = pytest-xdist>=1.13 hypothesis>=3.5.2 distribute = true +changedir=testing setenv = PYTHONDONTWRITEBYTECODE=1 commands = - pytest -n3 -rfsxX {posargs:testing} + pytest -n3 -rfsxX {posargs:.} [testenv:py27-trial] deps = twisted From 27cea340f34dd4fd7f225895656a89f5468f7b1f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 26 Oct 2017 21:55:28 -0200 Subject: [PATCH 2/2] Remove trailing whitespace --- testing/test_assertrewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 02270e157..78a5f2bae 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -66,7 +66,7 @@ class TestAssertionRewrite(object): s = """'Doc string'\nother = stuff""" m = rewrite(s) # Module docstrings in 3.7 are part of Module node, it's not in the body - # so we remove it so the following body items have the same indexes on + # so we remove it so the following body items have the same indexes on # all Python versions if sys.version_info < (3, 7): assert isinstance(m.body[0], ast.Expr)