I am going to assume that you are not calling this test class directly, but a derived class.
If this is the case, you need to call up setUpClass() manually - it will not be automatically called.
class TestB(TestRepGen): @classmethod def setUpClass(cls): super(TestB, cls).setUpClass()
Also, accoding to docs class-level fixtures are implemented by the test suite . So, if you call TestRepGen or test_method some weird way that you did not send messages, setUpClass may not start.
source share