2 new commits in pytest-xdist:

https://bitbucket.org/hpk42/pytest-xdist/commits/2a5dbb8df0f6/
Changeset:   2a5dbb8df0f6
User:        hpk42
Date:        2014-03-27 11:57:36
Summary:     properly extend tests to cover xfailing capturing modes
Affected #:  1 file

diff -r 81566ffbb2715bdd28499c808fd76e3315489908 -r 
2a5dbb8df0f6a804733f537091e15a04f62fb6c0 testing/test_boxed.py
--- a/testing/test_boxed.py
+++ b/testing/test_boxed.py
@@ -18,7 +18,11 @@
     ])
 
 @needsfork
-def test_functional_boxed_stdout(testdir):
+@pytest.mark.parametrize("capmode", [
+    "no",
+    pytest.mark.xfail("sys", reason="capture cleanup needed"),
+    pytest.mark.xfail("fd", reason="capture cleanup needed")])
+def test_functional_boxed_capturing(testdir, capmode):
     p1 = testdir.makepyfile("""
         import os
         import sys
@@ -27,7 +31,7 @@
             sys.stderr.write("world\\n")
             os.kill(os.getpid(), 15)
     """)
-    result = testdir.runpytest(p1, "--boxed")
+    result = testdir.runpytest(p1, "--boxed", "--capture=%s" % capmode)
     result.stdout.fnmatch_lines("""
         *CRASHED*
         *stdout*


https://bitbucket.org/hpk42/pytest-xdist/commits/5ba5bdb77d30/
Changeset:   5ba5bdb77d30
User:        hpk42
Date:        2014-05-14 08:13:56
Summary:     use config.getoption instead of deprecated config.getvalue
and adapt a few tests to also run against pytest-2.6.0.dev
Affected #:  3 files

diff -r 2a5dbb8df0f6a804733f537091e15a04f62fb6c0 -r 
5ba5bdb77d302b621508bde6fdca37349f7d17d7 testing/acceptance_test.py
--- a/testing/acceptance_test.py
+++ b/testing/acceptance_test.py
@@ -311,9 +311,9 @@
         """)
         result = testdir.runpytest("-n1", "-v")
         result.stdout.fnmatch_lines_random([
-            "*PASS*test_pass_skip_fail.py:2: *test_ok*",
-            "*SKIP*test_pass_skip_fail.py:4: *test_skip*",
-            "*FAIL*test_pass_skip_fail.py:6: *test_func*",
+            "*PASS*test_pass_skip_fail.py?2*test_ok*",
+            "*SKIP*test_pass_skip_fail.py?4*test_skip*",
+            "*FAIL*test_pass_skip_fail.py?6*test_func*",
         ])
         result.stdout.fnmatch_lines([
             "*def test_func():",
@@ -328,7 +328,7 @@
         """)
         result = testdir.runpytest("-n1", "-v")
         result.stdout.fnmatch_lines([
-            "*FAIL*test_fail_platinfo.py:1: *test_func*",
+            "*FAIL*test_fail_platinfo.py*1*test_func*",
             "*0*Python*",
             "*def test_func():",
             ">       assert 0",

diff -r 2a5dbb8df0f6a804733f537091e15a04f62fb6c0 -r 
5ba5bdb77d302b621508bde6fdca37349f7d17d7 testing/conftest.py
--- a/testing/conftest.py
+++ b/testing/conftest.py
@@ -7,7 +7,7 @@
 
 def pytest_addoption(parser):
     parser.addoption('--gx',
-       action="append", dest="gspecs", default=None,
+       action="append", dest="gspecs", 
        help=("add a global test environment, XSpec-syntax. "))
 
 def pytest_funcarg__specssh(request):

diff -r 2a5dbb8df0f6a804733f537091e15a04f62fb6c0 -r 
5ba5bdb77d302b621508bde6fdca37349f7d17d7 xdist/plugin.py
--- a/xdist/plugin.py
+++ b/xdist/plugin.py
@@ -53,14 +53,14 @@
 
 def pytest_cmdline_main(config):
     check_options(config)
-    if config.getvalue("looponfail"):
+    if config.getoption("looponfail"):
         from xdist.looponfail import looponfail_main
         looponfail_main(config)
         return 2 # looponfail only can get stop with ctrl-C anyway
 
 def pytest_configure(config, __multicall__):
     __multicall__.execute()
-    if config.getvalue("dist") != "no":
+    if config.getoption("dist") != "no":
         from xdist.dsession import DSession
         session = DSession(config)
         config.pluginmanager.register(session, "dsession")

Repository URL: https://bitbucket.org/hpk42/pytest-xdist/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to