[py-svn] py-trunk commit 2e8ad1a4fd49: rename pytest_ignore_collect_path to pytest_ignore_collect before release

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sun May 2 16:36:27 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1272806642 -7200
# Node ID 2e8ad1a4fd49b2f6c8b8140ee4581e4ca89e3684
# Parent  aadc25966770117d4edc2bf0ee5aba43cbee4340
rename pytest_ignore_collect_path to pytest_ignore_collect before release

--- a/testing/test_collect.py
+++ b/testing/test_collect.py
@@ -159,7 +159,7 @@ class TestPrunetraceback:
 class TestCustomConftests:
     def test_ignore_collect_path(self, testdir):
         testdir.makeconftest("""
-            def pytest_ignore_collect_path(path, config):
+            def pytest_ignore_collect(path, config):
                 return path.basename.startswith("x") or \
                        path.basename == "test_one.py"
         """)

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,10 +13,10 @@ Changes between 1.2.1 and 1.3.0 (release
 - fixes for handling of unicode exception values and unprintable objects
 - (issue87) fix unboundlocal error in assertionold code 
 - (issue86) improve documentation for looponfailing
-- add a new pytest_ignore_collect_path(path, config) hook to allow projects and
+- add a new pytest_ignore_collect(path, config) hook to allow projects and
   plugins to define exclusion behaviour for their directory structure - 
   for example you may define in a conftest.py this method:
-        def pytest_ignore_collect_path(path):
+        def pytest_ignore_collect(path):
             return path.check(link=1)
   to prevent even a collection try of any tests in symlinked dirs. 
 - new pytest_pycollect_makemodule(path, parent) hook for

--- a/doc/test/customize.txt
+++ b/doc/test/customize.txt
@@ -95,8 +95,8 @@ per-test run basetemp directory.
 .. _`function arguments`: funcargs.html
 .. _`extensions`: 
 
-Plugin basics
-=========================
+Plugin basics and project configuration 
+=============================================
 
 .. _`local plugin`:
 

--- a/py/_plugin/hookspec.py
+++ b/py/_plugin/hookspec.py
@@ -27,12 +27,12 @@ def pytest_unconfigure(config):
 # collection hooks
 # -------------------------------------------------------------------------
 
-def pytest_ignore_collect_path(path, config):
+def pytest_ignore_collect(path, config):
     """ return true value to prevent considering this path for collection. 
     This hook is consulted for all files and directories prior to considering
     collection hooks. 
     """
-pytest_ignore_collect_path.firstresult = True
+pytest_ignore_collect.firstresult = True
 
 def pytest_collect_directory(path, parent):
     """ return Collection node or None for the given path. """

--- a/py/_plugin/pytest_default.py
+++ b/py/_plugin/pytest_default.py
@@ -28,7 +28,7 @@ def pytest_funcarg__pytestconfig(request
     """ the pytest config object with access to command line opts."""
     return request.config
 
-def pytest_ignore_collect_path(path, config):
+def pytest_ignore_collect(path, config):
     ignore_paths = config.getconftest_pathlist("collect_ignore", path=path) 
     ignore_paths = ignore_paths or []
     excludeopt = config.getvalue("ignore")

--- a/py/_test/collect.py
+++ b/py/_test/collect.py
@@ -297,7 +297,7 @@ class Directory(FSCollector):
         return l
 
     def consider(self, path):
-        if self.ihook.pytest_ignore_collect_path(path=path, config=self.config):
+        if self.ihook.pytest_ignore_collect(path=path, config=self.config):
            return
         if path.check(file=1):
             res = self.consider_file(path)



More information about the pytest-commit mailing list