Closed fgmacedo closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
f236cad
) to head (24f8254
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Fixes #424.
Issue
As declared on the related issue:
The root cause of the issue lies in the
setUpTestData()
method. Every cls attr created in this method is wrapped in a TestData class, which performs adeepcopy()
for each test, so this is designed to allow safe alteration of objects between tests on the sameTestCase
instance.However, this conflicts with the creation strategy of state machines. The references of properties/methods used as actions/conditions are computed at the time of creation. So, when the state machine is cloned, the references still point to the original instance.
Fix
We've added a hook on the
deepcopy
Python protocol, where we reconstruct the new instance callable references.Tests