Testing compiled classes?
Does your project run tests against compiled classes as well? If you look, I added a new testing function called common2(). It checks compiled classes against core ones.
No, I honestly forgot to transfer your adjustments to your tests into this repo. But the compiled feature is not that important for me anyway, since I don't care so much about performance. Good type hints are much more important to me. If I have some more time, I might take a closer look at it, but currently I'm still very busy creating a GUI for construct 😉
There is a specific reason why I ask. I had a defect in a new class, ZigZag. Sometimes it returned floats instead of integers. If python was statically typed, it would probably have been caught right and there.
Was the defect insider the class or was it in the tests? Because I dont have included typ hints for the internals, just for that what the user normally uses. So I am not quiet sure if your defect would be caught, if it is inside the class.
Here is the fix commit: https://github.com/construct/construct/commit/4fce921815b37975e585a652a334ccf98063c53a
No, this would not have been caught with the type hints. In the type hint I assume that the correct types are returned by the construct. But I dont perform checks at runtime.