work around setUpModule vs setUpClass timing issues
Showing
-
This is for errors like this when building software fail ?
INFO Finished software releases. ERROR:slapos.testing.testcase:Error during request destruction Traceback (most recent call last): File "parts/slapos.core-repository/slapos/testing/testcase.py", line 615, in _cleanup cls.requestDefaultInstance(state='destroyed') File "parts/slapos.core-repository/slapos/testing/testcase.py", line 680, in requestDefaultInstance cls._instance_parameter_dict) AttributeError: type object 'SlapOSInstanceTestCase for ...' has no attribute '_instance_parameter_dict'
this is probably something we can fix in
slapos/testing/testcase
-
I did something for this in nexedi/slapos.core!202 (merged)
-
Maintainer
Sorry, missed your comment.
@jerome, yes.
There was a fundamental flaw in the design of this part of testing.testcase.
Basically, SetUpModule is always called before SetUpClass, so _instance_parameter_dict = {} which is in SetUpClass can never be done at SetUpModule time.
Design-wise SetUpModule can never be dependent on what SetUpclass is doing.
Please register or sign in to comment