2 new commits in pytest:

https://bitbucket.org/pytest-dev/pytest/commits/05b2ce3c000f/
Changeset:   05b2ce3c000f
User:        flub
Date:        2015-04-22 23:55:58+00:00
Summary:     Merge _pytest fixture reintroduction from pytest-2.7 branch

This was accidentally removed while some plugins depend on it.
Affected #:  2 files

diff -r f54e97fa410507a24f2533ce62fc6d7cbb038247 -r 
05b2ce3c000f0cb654e0c25009254b44658b0100 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -44,6 +44,8 @@
 - fixed regression to 2.6.4 which surfaced e.g. in lost stdout capture printing
   when tests raised SystemExit. Thanks Holger Krekel.
 
+- reintroduced _pytest fixture of the pytester plugin which is used
+  at least by pytest-xdist.
 
 2.7.0 (compared to 2.6.4)
 -----------------------------

diff -r f54e97fa410507a24f2533ce62fc6d7cbb038247 -r 
05b2ce3c000f0cb654e0c25009254b44658b0100 _pytest/pytester.py
--- a/_pytest/pytester.py
+++ b/_pytest/pytester.py
@@ -15,6 +15,24 @@
 
 from _pytest.main import Session, EXIT_OK
 
+# used at least by pytest-xdist plugin
+@pytest.fixture
+def _pytest(request):
+    """ Return a helper which offers a gethookrecorder(hook)
+    method which returns a HookRecorder instance which helps
+    to make assertions about called hooks.
+    """
+    return PytestArg(request)
+
+class PytestArg:
+    def __init__(self, request):
+        self.request = request
+
+    def gethookrecorder(self, hook):
+        hookrecorder = HookRecorder(hook._pm)
+        self.request.addfinalizer(hookrecorder.finish_recording)
+        return hookrecorder
+
 
 def get_public_names(l):
     """Only return names from iterator l without a leading underscore."""


https://bitbucket.org/pytest-dev/pytest/commits/1ee222525a03/
Changeset:   1ee222525a03
Branch:      reintroduce_pytest_fixture
User:        flub
Date:        2015-04-22 23:56:25+00:00
Summary:     Close merged bugfix branch
Affected #:  0 files

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.
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to