Skip to content

Test Methods

Vinicius Reif Biavatti edited this page Jul 25, 2022 · 1 revision
  • Use "test_" as prefix
  • Use a good representation name
  • Use underscore to separate
  • Use type hints
  • Do not use camel case
  • Do not use special symbols
  • Must have their first parameter named 'self'.
  • Do not use capital letters

✅ Do

class ListTest(unittest.TestCase):
    def test_append(self) -> None:
        ...

❌ Don't

class ListTest(unittest.TestCase):
    def append(self) -> None:
        ...
Clone this wiki locally