8000 Merge pull request #1067 from pyfisch/pyfisch-unittest2 · basic612/python-guide@7fdf141 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7fdf141

Browse files
authored
Merge pull request realpython#1067 from pyfisch/pyfisch-unittest2
Remove section on unittest2
2 parents 0687321 + 140f103 commit 7fdf141

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

docs/writing/tests.rst

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -248,35 +248,6 @@ simple INI-style configuration file.
248248
`tox <https://tox.readthedocs.io/en/latest/>`_
249249

250250

251-
Unittest2
252-
---------
253-
254-
unittest2 is a backport of Python 2.7's unittest module which has an improved
255-
API and better assertions over the one available in previous versions of Python.
256-
257-
If you're using Python 2.6 or below, you can install it with pip:
258-
259-
.. code-block:: console
260-
261-
$ pip install unittest2
262-
263-
You may want to import the module under the name unittest to make porting code
264-
to newer versions of the module easier in the future
265-
266-
.. code-block:: python
267-
268-
import unittest2 as unittest
269-
270-
class MyTest(unittest.TestCase):
271-
...
272-
273-
This way if you ever switch to a newer Python version and no longer need the
274-
unittest2 module, you can simply change the import in your test module without
275-
the need to change any other code.
276-
277-
`unittest2 <http://pypi.org/project/unittest2>`_
278-
279-
280251
mock
281252
----
282253

0 commit comments

Comments
 (0)
0