Python’s built-in ‘unittest’ framework predates PEP-8 so the naming conventions don’t conform to snake_case naming conventions (python:S1542)
It looks like exceptions to the rule already exist for:
- setUp()
- tearDown()
- setUpClass()
- tearDownClass()
Code smell false positives (python:S1542) occur for the following:
- setUpModule()
- tearDownModule()
Code Sample:
def setUpModule():
# code that runs before the test suites load
def tearDownModule():
# code that runs after all of the test suites complete
Official documentation for setUpModule() & tearDownModule():
https://docs.python.org/3/library/unittest.html#setupmodule-and-teardownmodule
SQ Version: Developer Edition 9.3 (build 51899)