I have been looking at PEP 8 -- Style Guide for Python Code and PEP8 -- Advanced Usage for clues on how to name my test classes. However, this is never mentioned on both sit
Django and SQLAlchemy, two large, popular Python projects, both use "Name"Test(s). Personally, I prefer that to Test"Name", mainly because when there are multiple TestCases in a file, having each start with "Test" makes scanning difficult.
Not saying this equals a consensus, only two significant data points and a personal observation.
The documentation for unittest suggests, e.g.:
class TestSequenceFunctions(unittest.TestCase):
def test_shuffle(self):
...
def test_choice(self):
...
commenting
The three individual tests are defined with methods whose names start with the letters
test
. This naming convention informs the test runner about which methods represent tests.