2012/8/17 jelle feringa <jelleferi...@gmail.com> > I think (but I'm not sure), that removing the __hash__ method introduces >> some regression. >> > > A solid test for __hash__ is critical. One needs to be able to compare > TopoDS_* instances for example, and I recall having some issues in the past > with the hashes. > Anyway, comparing TopoDS_* can be somewhat tricky. > Can you be more specific Thomas? > That way I can think about a better unittest. > > -jelle > > There were issues with hashes before the overloading of the python __hash__ method with the HashCode OCCT method (which is now a static function). This has been solved some time ago.
There's already a unittest for hash (see TestList here https://github.com/tpaviot/pythonocc/blob/master/src/unittest/wrapper_features_unittest.py#L43). I think it is sufficient, but you can extend it with additional use cases. Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users