[Pytest-commit] commit/pytest: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sat Mar 14 12:35:40 CET 2015


2 new commits in pytest:

https://bitbucket.org/pytest-dev/pytest/commits/6bec93260b60/
Changeset:   6bec93260b60
Branch:      merge-cache
User:        RonnyPfannschmidt
Date:        2015-03-14 10:45:44+00:00
Summary:     changelog entries
Affected #:  1 file

diff -r 552d1d498bf39e4118f02eb9653bd6fad774c2db -r 6bec93260b60d258076a246028cef52f9faa9dfb CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,11 @@
 2.7.0.dev (compared to 2.6.4)
 -----------------------------
 
+- merge in pytest-cache code and ignore the external plugin
+
+- add looponchange which is a clone of xdists looponfail altered to use
+  cache and subprocess invocations
+
 - fix issue616: conftest.py files and their contained fixutres are now
   properly considered for visibility, independently from the exact
   current working directory and test arguments that are used.


https://bitbucket.org/pytest-dev/pytest/commits/bf6f8a626afb/
Changeset:   bf6f8a626afb
Branch:      merge-cache
User:        RonnyPfannschmidt
Date:        2015-03-14 11:35:20+00:00
Summary:     switch looponchange activation control to env var to protect against addopts
Affected #:  1 file

diff -r 6bec93260b60d258076a246028cef52f9faa9dfb -r bf6f8a626afb870b19a91ff3993203e264fc2e9c _pytest/onchange.py
--- a/_pytest/onchange.py
+++ b/_pytest/onchange.py
@@ -1,11 +1,8 @@
 import py
 import subprocess
 import pkg_resources
-
-SCRIPT = """
-import pytest
-pytest.main(%r)
-"""
+import os
+import sys
 
 
 def pytest_addoption(parser):
@@ -42,17 +39,15 @@
 
 
 def looponchange(config):
+    if 'PYTEST_LOOPONFAIL_ACTIVE' in os.environ:
+        return
+    os.environ['PYTEST_LOOPONFAIL_ACTIVE'] = '1'
     newargs = config._origargs[:]
-    if '--looponchange' in newargs:
-        newargs.remove('--looponchange')
-    else:
-        newargs.remove('-f')
-    if '--looponfail' in newargs:
-        newargs.remove('--looponfail')
-        newargs.append('--lf')
     stats = StatRecorder(config.getini('looponchangeroots'))
-    command = py.std.functools.partial(run_once, [
-            py.std.sys.executable, '-c', SCRIPT % newargs])
+
+    def command():
+        run_once([sys.executable, '-m', 'pytest'] + config._origargs)
+
     command()
     loop_forever(stats, command)
     return 2

Repository URL: https://bitbucket.org/pytest-dev/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the pytest-commit mailing list