From 6c90059342fe0c837130c2ba2449b85373df77dc Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 31 May 2011 15:21:08 +0200 Subject: [PATCH] - properly include _pytest.assertion in distribution - import assertion only at import-test module time --- _pytest/__init__.py | 2 +- _pytest/python.py | 2 +- setup.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 874061133..6d9ab3c7b 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.1.0.dev2' +__version__ = '2.1.0.dev3' diff --git a/_pytest/python.py b/_pytest/python.py index ae964f0b8..72c5ab0ac 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -4,7 +4,6 @@ import inspect import sys import pytest from py._code.code import TerminalRepr -from _pytest import assertion import _pytest cutdir = py.path.local(_pytest.__file__).dirpath() @@ -227,6 +226,7 @@ class Module(pytest.File, PyCollectorMixin): def _importtestmodule(self): # we assume we are only called once per module + from _pytest import assertion assertion.before_module_import(self) try: try: diff --git a/setup.py b/setup.py index bb0f3f124..516847798 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.1.0.dev2', + version='2.1.0.dev3', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], @@ -41,7 +41,7 @@ def main(): 'Topic :: Utilities', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], - packages=['_pytest', ], + packages=['_pytest', '_pytest.assertion'], py_modules=['pytest'], zip_safe=False, )