Hi,
We have a large test base with test cases which inherit from each other. I am in the process of converting them to Django 1.8 and tried to use the new setUpTestData class method for setting up test data.
This fails in a very strange way for tests using inheritance: setUpTestData is only invoked for the base class and not for the derived class. I think this may be because of this commit, which changes and overrides setUpClass and tearDownClass in a way which I honestly don't quite understand...
I have created a failing test which shows the problem; the lines which cause errors are annotated with TODO comments.
Any ideas on how to fix or circumvent this problem are greatly appreciated! :-)
Hi,
We have a large test base with test cases which inherit from each other. I am in the process of converting them to Django 1.8 and tried to use the new
setUpTestDataclass method for setting up test data.This fails in a very strange way for tests using inheritance:
setUpTestDatais only invoked for the base class and not for the derived class. I think this may be because of this commit, which changes and overridessetUpClassandtearDownClassin a way which I honestly don't quite understand...I have created a failing test which shows the problem; the lines which cause errors are annotated with
TODOcomments.Any ideas on how to fix or circumvent this problem are greatly appreciated! :-)