From d98d122e81324f22938a5791860820be993a29f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Wed, 25 Jan 2017 14:20:38 +0200 Subject: [PATCH 1/2] Discourage users from using this all the time. --- doc/en/unittest.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/en/unittest.rst b/doc/en/unittest.rst index 430d5ca55..43b6526c7 100644 --- a/doc/en/unittest.rst +++ b/doc/en/unittest.rst @@ -17,6 +17,14 @@ run using ``pytest``. We assume here that you are familiar with writing ``unittest.TestCase`` style tests and rather focus on integration aspects. +Note that this is meant as a provisional way of running your test code +until you fully convert to pytest-style tests. To fully take advantage of +:ref:`fixtures `, :ref:`parametrization ` and +:ref:`hooks ` you should convert (tools like `unittest2pytest +`__ are helpful). +Also, not all 3rd party pluging are expected to work best with +``unittest.TestCase`` style tests. + Usage ------------------------------------------------------------------- @@ -191,12 +199,3 @@ was executed ahead of the ``test_method``. pytest fixtures into unittest suites. And of course you can also start to selectively leave away the ``unittest.TestCase`` subclassing, use plain asserts and get the unlimited pytest feature set. - - -Converting from unittest to pytest ---------------------------------------- - -If you want to convert your unittest testcases to pytest, there are -some helpers like `unittest2pytest -`__, which uses lib2to3 -and introspection for the transformation. From c8032a9bbb18cdbcf7d01303a2a846fbc048b76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Wed, 25 Jan 2017 14:44:07 +0200 Subject: [PATCH 2/2] Fix reference. --- doc/en/unittest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/unittest.rst b/doc/en/unittest.rst index 43b6526c7..1bee0e146 100644 --- a/doc/en/unittest.rst +++ b/doc/en/unittest.rst @@ -20,7 +20,7 @@ integration aspects. Note that this is meant as a provisional way of running your test code until you fully convert to pytest-style tests. To fully take advantage of :ref:`fixtures `, :ref:`parametrization ` and -:ref:`hooks ` you should convert (tools like `unittest2pytest +:ref:`hooks ` you should convert (tools like `unittest2pytest `__ are helpful). Also, not all 3rd party pluging are expected to work best with ``unittest.TestCase`` style tests.