Fix tvtk attribute with undefined _void value#362
Conversation
…per default value and allow a string to be assigned using traits.Either
|
For VTK 6.3 and VTK 7.0, these are the VTK classes with ill-defined *Position attributes on initialisation. With this PR, |
|
The last commit makes this PR even more general than it started with. Previously there were loads more. |
| PY_VER = sys.version_info[0] | ||
|
|
||
|
|
||
| def patch_default(parser, vtk_set_meth, default): |
There was a problem hiding this comment.
Nevermind my previous self-review.
Current coverage is 45.37%@@ master #362 diff @@
==========================================
Files 254 254
Lines 22891 22916 +25
Methods 0 0
Messages 0 0
Branches 3028 3036 +8
==========================================
+ Hits 10395 10397 +2
- Misses 11762 11785 +23
Partials 734 734 |
|
In response to #360, I think of an alternative implementation that could fix (/work around) both problems. |
|
I think this is a really dangerous workaround... if VTK is providing an uninitialised buffer we should know if it's uninitialized from an authoritative source. If there isn't, then we should throw an exception until it's certain it has been initialized. |
|
@stefanoborini Don't worry, I am implementing something with traits.Undefined. Since I am reimplementing the |
Fix #357
I also realise that for VTK 6.x and VTK 7, a number of VTK classes do not initialise
*Positionattributes properly. This would fix for them too.Will lead to conflict with #358 upon merge, unfortunately