2011-09-06 17:43:42 +08:00
|
|
|
Running tests written for nose
|
2010-11-06 18:38:53 +08:00
|
|
|
=======================================
|
|
|
|
|
|
|
|
.. include:: links.inc
|
|
|
|
|
|
|
|
py.test has basic support for running tests written for nose_.
|
|
|
|
|
2012-10-12 20:52:36 +08:00
|
|
|
.. _nosestyle:
|
|
|
|
|
2010-11-06 18:38:53 +08:00
|
|
|
Usage
|
|
|
|
-------------
|
|
|
|
|
2012-10-12 20:52:36 +08:00
|
|
|
After :ref:`installation` type::
|
2010-11-06 18:38:53 +08:00
|
|
|
|
2013-08-23 18:59:57 +08:00
|
|
|
python setup.py develop # make sure tests can import our package
|
2010-11-06 18:38:53 +08:00
|
|
|
py.test # instead of 'nosetests'
|
|
|
|
|
2010-11-18 21:56:16 +08:00
|
|
|
and you should be able to run your nose style tests and
|
|
|
|
make use of py.test's capabilities.
|
2010-11-06 18:38:53 +08:00
|
|
|
|
|
|
|
Supported nose Idioms
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
* setup and teardown at module/class/method level
|
|
|
|
* SkipTest exceptions and markers
|
|
|
|
* setup/teardown decorators
|
|
|
|
* yield-based tests and their setup
|
|
|
|
* general usage of nose utilities
|
|
|
|
|
2010-11-18 21:56:16 +08:00
|
|
|
Unsupported idioms / known issues
|
2010-11-06 18:38:53 +08:00
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
- nose-style doctests are not collected and executed correctly,
|
2010-11-18 21:56:16 +08:00
|
|
|
also doctest fixtures don't work.
|
2010-11-06 18:38:53 +08:00
|
|
|
|
|
|
|
- no nose-configuration is recognized
|
|
|
|
|
|
|
|
|