IDE extension that lets you fix coding issues before they exist!
Setup is effortless and analysis is automatic for most languages
Fast, accurate analysis; enterprise scalability
Classes subclassing only unittest.TestCase are considered test cases, otherwise they might be mixins.
unittest.TestCase
As classes subclassing unittest.TestCase will be executed as tests, they should define test methods and not be used as "abstract"
parent helper. Methods within the class will be discovered by the test runner if their name starts with test. If a method intended to be
a test does not respect this convention, it will not be executed.
test
This rule raises an issue when a method is not discoverable as a test and is never used within its test case class.
This rule will not raise if:
tearDown
import unittest
class MyTest(unittest.TestCase):
def setUp(self): ... # OK (unittest.TestCase method)
def something_test(self): ... # Noncompliant
import unittest
class MyTest(unittest.TestCase):
def setUp(self): ...
def test_something(self): ...