@@ -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,16 +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
72+ Here is a table comparing the default supported naming conventions for both
73+ nose and pytest.
74+
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+
89+
7390Migrating from nose to pytest
7491------------------------------
7592
7693`nose2pytest <https://github.com/pytest-dev/nose2pytest >`_ is a Python script
7794and pytest plugin to help convert Nose-based tests into pytest-based tests.
78- Specifically, the script transforms nose.tools.assert_* function calls into
95+ Specifically, the script transforms `` nose.tools.assert_* `` function calls into
7996raw assert statements, while preserving format of original arguments
8097as much as possible.
8198
0 commit comments