diff --git a/_pytest/nose.py b/_pytest/nose.py index ffa186923..ef7b78183 100644 --- a/_pytest/nose.py +++ b/_pytest/nose.py @@ -41,7 +41,7 @@ def pytest_make_collect_report(collector): def call_optional(obj, name): method = getattr(obj, name, None) - if method is not None and not hasattr(method, "_pytestfixturefunction") and callable(method): + if method is not None and not hasattr(method, "_pytestfixturefunction") and py.builtin.callable(method): # If there's any problems allow the exception to raise rather than # silently ignoring them method() diff --git a/setup.py b/setup.py index a25e9f302..b4f09628d 100644 --- a/setup.py +++ b/setup.py @@ -7,15 +7,39 @@ except ImportError: from setuptools import setup, Command long_description = """ -cross-project testing tool for Python. +The `py.test`` testing tool makes it easy to write small tests, yet +scales to support complex functional testing. It provides -Platforms: Linux, Win32, OSX +- `auto-discovery + `_ + of test modules and functions, +- detailed info on failing `assert statements `_ (no need to remember ``self.assert*`` names) +- `modular fixtures `_ for + managing small or parametrized long-lived test resources. +- multi-paradigm support: you can use ``py.test`` to run test suites based + on `unittest `_ (or trial), + `nose `_ +- single-source compatibility to Python2.4 all the way up to Python3.3, + PyPy and Jython. -Interpreters: Python versions 2.4 through to 3.3, Jython 2.5.1 and PyPy-1.9 +- many `external plugins `_. -Bugs and issues: http://bitbucket.org/hpk42/pytest/issues/ +A simple example for a test:: -Web page: http://pytest.org + # content of test_module.py + def test_function(): + i = 4 + assert i == 3 + +which can be run with ``py.test test_module.py``. See `getting-started `_ for more examples. + +For much more info, including PDF docs, see + + http://pytest.org + +and report bugs at: + + http://bitbucket.org/hpk42/pytest/issues/ (c) Holger Krekel and others, 2004-2012 """