Jeroen Demeyer: > On 2017-09-06 14:53, Ximin Luo wrote: >> I've seen numerous cases where Sage has to change the expected test output >> simply because a dependency was upgraded. There has to be a more sustainable >> way of achieving this... > > Suggestions welcome... > > Note that none of your above proposals is relevant to the typical PARI > failures. We would need support in the doctest framework for stuff like "# > generates same group" or "# same element of H^1(...)" or whatever. I don't > think this can be fixed in the doctest framework. >
OK. Another suggestion would be to wrap many of the test cases in normalising functions like round() or whatever is appropriate (for PARI it would be group theory related stuff). For example: >>> calculate_many_floats() ((0.100, 25.000), (3.555, 123.000)) - becomes >>> recursive_round(calculate_many_floats(), 4) ((0.100, 25.000), (3.555, 123.000)) and >>> generate_group() # whatever - becomes >>> normalise(generate_group()) # whatever If there is no "normalise" function for that context, perhaps there is at least a method to check that two objects represent the same mathematical group, so: >>> generate_group() [some representation] - becomes >>> is_same_group(generate_group(), [other representation]) True Hopefully this is less brittle than what happens currently. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
