You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be some code duplication between tests and examples (e.g. test_triangulation.test_tri_smooth_contouring and pylab_examples/tricontour_smooth_user.py). Perhaps it would make sense for the tests to simply import the relevant example file instead (which should trigger the plotting), in a context where plt.show() is patched to do nothing.
The text was updated successfully, but these errors were encountered:
I'm opposed to this.
I think the cases where it could be done smoothly are quite rare. Most of the test images are very specifically designed as tests, not as examples; the two applications favor different tradeoffs. Overall, I think your proposal would only serve to make our test infrastructure even more fragile and mind-boggling than it already is. And to make it harder for us to modify and improve examples.
Another advantage of keeping them seperate is that once we have used some code as a test, we can no longer really change that code (with out also re-generating the test image). However, with an example we want to be able to change it to make it look better or be clearer. Updating examples are also a great way to on board brand new contributors, in that context connecting them to the tests would add too much friction to that.
There seems to be some code duplication between tests and examples (e.g.
test_triangulation.test_tri_smooth_contouring
andpylab_examples/tricontour_smooth_user.py
). Perhaps it would make sense for the tests to simply import the relevant example file instead (which should trigger the plotting), in a context whereplt.show()
is patched to do nothing.The text was updated successfully, but these errors were encountered: