Repository navigation
BUG: make report_diff_values returns consistent (ignoring terminal size) - #16065
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
89f1646 to
3456e6e
Compare
taldcroft
left a comment
There was a problem hiding this comment.
Looks good, just a few nits.
| colnames.insert(50, "test") | ||
| t2 = Table(names=colnames) | ||
|
|
||
| assert not report_diff_values(t1, t2) |
There was a problem hiding this comment.
Just to be tidy I'd suggest catching the output in a StringIO() object like above. It feels not nice to be printing some huge diff to stdout in the test.
| @@ -0,0 +1 @@ | |||
| Make ``report_diff_values`` returns consistent (ignoring terminal size). | |||
There was a problem hiding this comment.
| Make ``report_diff_values`` returns consistent (ignoring terminal size). | |
| Update ``report_diff_values`` so the diff no longer depends on the console terminal size. |
3456e6e to
7eac388
Compare
|
@taldcroft thanks for your review ! I've addressed your comments. |
|
@pllim - you marked this a 6.1.0. I think this version should be backport-able since it is pretty narrow and fixes a problem that is clearly a bug IMO. |
…stent (ignoring terminal size)
|
OK it will be backported. Thanks, all! |
…065-on-v6.0.x Backport PR #16065 on branch v6.0.x (BUG: make report_diff_values returns consistent (ignoring terminal size))
…ze) (#16065) * TST: add a regression test for issue 14010 * BUG: make report_diff_values returns consistent (ignoring terminal size)
Description
Fixes #14010 in a backportable fashion as suggested by @taldcroft. This puts the context manager in a decorator to minimize the diff.
Broader changes are to be discussed in #15828 and should probably be defered to the next major version.