Check base_of_exclude attribute on Primitive - #1749
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1749 +/- ##
==========================================
+ Coverage 98.63% 98.71% +0.07%
==========================================
Files 138 138
Lines 15373 15377 +4
==========================================
+ Hits 15163 15179 +16
+ Misses 210 198 -12
Continue to review full report at Codecov.
|
| test_primitive.stack_on = [] | ||
| child.primitive.base_of = [] | ||
| child.primitive.base_of_exclude = [test_primitive] | ||
| assert not check_stacking(test_primitive(), [child]) |
There was a problem hiding this comment.
if stack_on and base_of are both set to []. check_stacking will return False even if test_primitive is not in base_of_exclude
There was a problem hiding this comment.
Oh okay, interesting. I changed stack_on and base_of to None so they can return True. It kind of seems like whether None or [] the value should be the same.
There was a problem hiding this comment.
I think None means no whitelist while [] means an empty whitelist, so nothing allowed
…s into base-of-exclude
Currently, we check the
base_of_excludeattribute on Feature classes instead of Primitive classes which raises an error.Example
Related to #1739