python - PEP8 naming convention on test classes -
i have been looking @ pep 8 -- style guide python code , pep8 -- advanced usage clues on how name test classes. however, never mentioned on both sites, many other sites have looked at, such unittest page in python documentation. consistent style see "capwords". in unittest documentation have examples testsequencefunctions defaultwidgetsizetestcase.
what trying find out whether use "name"test or test"name". methods use test_"name" , that's pretty established. regards classes struggling find convention if there's one.
would appreciate forum's on this.
the documentation unittest
suggests, e.g.:
class testsequencefunctions(unittest.testcase): def test_shuffle(self): ... def test_choice(self): ...
commenting
the 3 individual tests defined methods names start letters
test
. naming convention informs test runner methods represent tests.
Comments
Post a Comment