summaryrefslogtreecommitdiff
path: root/doc/en/test/plugin/nose.rst
blob: 9eeae5ff697f05a22651f96f0a9be0ce2104e590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

nose-compatibility plugin: allow to run nose test suites natively.
==================================================================


.. contents::
  :local:

This is an experimental plugin for allowing to run tests written
in 'nosetests' style with ``pytest``.

Usage
-------------

type::

    pytest  # instead of 'nosetests'

and you should be able to run nose style tests and at the same
time can make full use of pytest's capabilities.

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

Unsupported idioms / issues
----------------------------------

- nose-style doctests are not collected and executed correctly,
  also fixtures don't work.

- no nose-configuration is recognized

If you find other issues or have suggestions please run::

    pytest --pastebin=all

and send the resulting URL to a ``pytest`` contact channel,
at best to the mailing list.

Start improving this plugin in 30 seconds
=========================================


1. Download `pytest_nose.py`_ plugin source code
2. put it somewhere as ``pytest_nose.py`` into your import path
3. a subsequent ``pytest`` run will use your local version

Checkout customize_, other plugins_ or `get in contact`_.

.. include:: links.txt