From ddd773ecb1d7631df86de9a09327c7eb003dd627 Mon Sep 17 00:00:00 2001 From: mickeypash Date: Wed, 31 Mar 2021 11:54:33 +0100 Subject: [PATCH] [docs] add table nose x pytest naming comparison --- doc/en/how-to/nose.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/en/how-to/nose.rst b/doc/en/how-to/nose.rst index a736dfa55..9ef56c6d7 100644 --- a/doc/en/how-to/nose.rst +++ b/doc/en/how-to/nose.rst @@ -70,6 +70,34 @@ Unsupported idioms / known issues fundamentally incompatible with pytest because they don't support fixtures 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 ------------------------------