Repository navigation
Removed undo - #342
Removed undo#342
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-3.0 #342 +/- ##
===============================================
- Coverage 93.78% 92.70% -1.08%
===============================================
Files 48 47 -1
Lines 3764 3400 -364
===============================================
- Hits 3530 3152 -378
- Misses 234 248 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
damskii9992
left a comment
There was a problem hiding this comment.
Just 1 unnecessary test and a question. Otherwise it LGTM
| def test_no_undo_stack(self): | ||
| """Undo/redo support has been removed from the GlobalObject""" |
There was a problem hiding this comment.
Test for removed functionality? :)
There was a problem hiding this comment.
Bad bot! Need to tweak UNIT_TESTS.md
| self._array.variances = variance.astype('float') | ||
| # Values must be floats for optimization | ||
| variance = variance.astype('float') | ||
| self._array.variances = variance |
There was a problem hiding this comment.
What happened here? Did you find a bug?
There was a problem hiding this comment.
Good catch! Yes, this was a bug.
the setter accepts None, which clears the variances.
The rest of the code is inside if variance is not None, but the old last line was outside that block.
So descriptor.variance = None crashed with AttributeError: 'NoneType' object has no attribute 'astype', and you couldn't clear the variances through the property.
Also, added a test for it in test_descriptor_array.
I know we want to potentially remove descriptor array entirely, but I wanted to fix this in case we keep the class.
The undo/redo stack needs complete overhaul. This PR removes any vestiges of it so we can start from fresh.
For reference, the pre-PR version of
release-3.0will be forked off.