From 97f03edcd6f432c5173056da65103afad55e937f Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 22 Oct 2012 10:17:50 +0200 Subject: [PATCH] fix issue205 - nested conftest to pickup pycollect_makemodule - relates to the two reports of a failing doc/en/example/py2py3. --- CHANGELOG | 3 +++ _pytest/__init__.py | 2 +- _pytest/python.py | 4 ++-- setup.py | 2 +- testing/test_python.py | 15 +++++++++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b950a9f47..1b82a7d06 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Changes between 2.3.1 and 2.3.2.dev ----------------------------------- +- fix issue205 - conftests in subdirs customizing + pytest_pycollect_makemodule now work properly + - add tox.ini to pytest distribution so that ignore-dirs and others config bits are properly distributed for maintainers who run pytest-own tests diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 5bbdf5485..06d98c3a3 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.3.2.dev3' +__version__ = '2.3.2.dev4' diff --git a/_pytest/python.py b/_pytest/python.py index 221e15197..2b8344ce2 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -161,8 +161,8 @@ def pytest_collect_file(path, parent): break else: return - return parent.ihook.pytest_pycollect_makemodule( - path=path, parent=parent) + ihook = parent.session.gethookproxy(path) + return ihook.pytest_pycollect_makemodule(path=path, parent=parent) def pytest_pycollect_makemodule(path, parent): return Module(path, parent) diff --git a/setup.py b/setup.py index 44761f1c0..593cfba23 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.3.2.dev3', + version='2.3.2.dev4', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff --git a/testing/test_python.py b/testing/test_python.py index d2ee7e3f2..03c7155b4 100644 --- a/testing/test_python.py +++ b/testing/test_python.py @@ -404,6 +404,21 @@ class TestConftestCustomization: "*