Skip to content

Commit 0931fe2

Browse files
authored
Merge pull request #2221 from pytest-dev/ionelmc-patch-1
Discourage users from using unittest support somewhat
2 parents beb77c1 + c8032a9 commit 0931fe2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/en/unittest.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ run using ``pytest``. We assume here that you are familiar with writing
1717
``unittest.TestCase`` style tests and rather focus on
1818
integration aspects.
1919

20+
Note that this is meant as a provisional way of running your test code
21+
until you fully convert to pytest-style tests. To fully take advantage of
22+
:ref:`fixtures <fixture>`, :ref:`parametrization <parametrize>` and
23+
:ref:`hooks <writing-plugins>` you should convert (tools like `unittest2pytest
24+
<https://pypi.python.org/pypi/unittest2pytest/>`__ are helpful).
25+
Also, not all 3rd party pluging are expected to work best with
26+
``unittest.TestCase`` style tests.
27+
2028
Usage
2129
-------------------------------------------------------------------
2230

@@ -191,12 +199,3 @@ was executed ahead of the ``test_method``.
191199
pytest fixtures into unittest suites. And of course you can also start
192200
to selectively leave away the ``unittest.TestCase`` subclassing, use
193201
plain asserts and get the unlimited pytest feature set.
194-
195-
196-
Converting from unittest to pytest
197-
---------------------------------------
198-
199-
If you want to convert your unittest testcases to pytest, there are
200-
some helpers like `unittest2pytest
201-
<https://pypi.python.org/pypi/unittest2pytest/>`__, which uses lib2to3
202-
and introspection for the transformation.

0 commit comments

Comments
 (0)