New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test that classes are printable and srepr:able #22666
Comments
It might be that some objects are a subclass of I like the idea of having stricter checks for Perhaps this can be generalized, with one file containing the creation of all these objects and then there can be seperate files that test certain aspects (like the arg invariance, or printing and possibly other formal requirements that are currently not being tested) |
Maybe |
Another thing that I would like to see tested is that |
Out of curiosity, are there any situations where this is "sensitive"? |
It seems like there should be a test in test_args that all classes are printable (in the sense that str, srepr, latex and pretty does not give an error) and that
srepr
of the object can be used to recreate the same object. The printable, I know how to implement (although it is currently not the state of the code), but for the second it is not that simple.Using
sympify
will not work for all classes it seems. Especially vectors that are recreated as a member of its parent system, e.g.sympify(srepr(C.i))
will complain that the memberi
is not available. Usingeval
will require all imports to happen at the top level and not inside the test-functions (as is sometimes the case now). This may be the most feasible approach, but there are some duplicate class names I think.Any ideas or opinions?
The text was updated successfully, but these errors were encountered: