Skip to content

Commit b81003f

Browse files
committed
Incorporate legend into main table
1 parent ddd773e commit b81003f

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

doc/en/how-to/nose.rst

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ Unsupported idioms / known issues
4747
- nose imports test modules with the same import path (e.g.
4848
``tests.test_mode``) but different file system paths
4949
(e.g. ``tests/test_mode.py`` and ``other/tests/test_mode.py``)
50-
by extending sys.path/import semantics. pytest does not do that
51-
but there is discussion in :issue:`268` for adding some support. Note that
50+
by extending sys.path/import semantics. pytest does not do that. Note that
5251
`nose2 choose to avoid this sys.path/import hackery <https://nose2.readthedocs.io/en/latest/differences.html#test-discovery-and-loading>`_.
5352

5453
If you place a conftest.py file in the root directory of your project
@@ -66,44 +65,34 @@ Unsupported idioms / known issues
6665

6766
- no nose-configuration is recognized.
6867

69-
- ``yield``-based methods are unsupported as of pytest 4.1.0. They are
68+
- ``yield``-based methods are
7069
fundamentally incompatible with pytest because they don't support fixtures
7170
properly since collection and test execution are separated.
7271

7372
Here is a table comparing the default supported naming conventions for both
7473
nose and pytest.
7574

76-
========================== ======== ======
77-
Convention nose pytest
78-
========================== ======== ======
79-
Ⓜ test*.py ✅
80-
Ⓜ test_*.py ✅ ✅
81-
\*_test.py ✅
82-
\*_tests.py
83-
\*\(unittest.TestCase\) ✅ ✅
84-
test_\* ✅ ✅
85-
Ⓒ Test\*
86-
test_\*
87-
test_\*
88-
========================== ======== ======
89-
90-
Symbols are described below
91-
92-
======= =========
93-
Legend
94-
======= =========
95-
Ⓜ module
96-
Ⓒ Class
97-
ⓜ method
98-
ⓕ function
99-
======= =========
75+
========= ========================== ======= =====
76+
what default naming convention pytest nose
77+
========= ========================== ======= =====
78+
module ``test*.py`` ✅
79+
module ``test_*.py`` ✅ ✅
80+
module ``*_test.py`` ✅
81+
module ``*_tests.py``
82+
class ``*(unittest.TestCase)`` ✅ ✅
83+
method ``test_*`` ✅ ✅
84+
class ``Test*`` ✅
85+
method ``test_*`` ✅
86+
function ``test_*`` ✅
87+
========= ========================== ======= =====
88+
10089

10190
Migrating from nose to pytest
10291
------------------------------
10392

10493
`nose2pytest <https://github.com/pytest-dev/nose2pytest>`_ is a Python script
10594
and pytest plugin to help convert Nose-based tests into pytest-based tests.
106-
Specifically, the script transforms nose.tools.assert_* function calls into
95+
Specifically, the script transforms ``nose.tools.assert_*`` function calls into
10796
raw assert statements, while preserving format of original arguments
10897
as much as possible.
10998

0 commit comments

Comments
 (0)