[docs] add table nose x pytest naming comparison

This commit is contained in:
mickeypash 2021-03-31 11:54:33 +01:00 committed by Zac Hatfield-Dodds
parent 2203897086
commit ddd773ecb1
1 changed files with 28 additions and 0 deletions

View File

@ -70,6 +70,34 @@ Unsupported idioms / known issues
fundamentally incompatible with pytest because they don't support fixtures fundamentally incompatible with pytest because they don't support fixtures
properly since collection and test execution are separated. properly since collection and test execution are separated.
Here is a table comparing the default supported naming conventions for both
nose and pytest.
========================== ======== ======
Convention nose pytest
========================== ======== ======
Ⓜ test*.py ✅
Ⓜ test_*.py ✅ ✅
Ⓜ \*_test.py ✅
Ⓜ \*_tests.py
Ⓒ \*\(unittest.TestCase\) ✅ ✅
ⓜ test_\* ✅ ✅
Ⓒ Test\* ✅
ⓜ test_\* ✅
ⓕ test_\* ✅
========================== ======== ======
Symbols are described below
======= =========
Legend
======= =========
Ⓜ module
Ⓒ Class
ⓜ method
ⓕ function
======= =========
Migrating from nose to pytest Migrating from nose to pytest
------------------------------ ------------------------------