fix pytest-xdist breakage

This commit is contained in:
holger krekel 2011-07-05 18:01:31 +02:00
parent 46950ef19a
commit d105e75d87
3 changed files with 6 additions and 3 deletions

View File

@ -1,2 +1,2 @@
#
__version__ = '2.1.0.dev6'
__version__ = '2.1.0.dev7'

View File

@ -68,7 +68,10 @@ def pytest_unconfigure(config):
if hook is not None:
sys.meta_path.remove(hook)
def pytest_sessionstart(session):
def pytest_collection(session):
# this hook is only called when test modules are collected
# so for example not in the master process of pytest-xdist
# (which does not collect test modules)
hook = session.config._assertstate.hook
if hook is not None:
hook.set_session(session)

View File

@ -22,7 +22,7 @@ def main():
name='pytest',
description='py.test: simple powerful testing with Python',
long_description = long_description,
version='2.1.0.dev6',
version='2.1.0.dev7',
url='http://pytest.org',
license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],