Conversation
|
|
||
|
|
||
| def print_heading(msg, last=False): | ||
| global first |
There was a problem hiding this comment.
Can we avoid the global and just print an extra newline here?
There was a problem hiding this comment.
I think I ended up having to do this because:
- Some tests suites call
print_headingmulitple times. - We want the extra newlines also when running the suites as part of
auto_update_tests.py
There was a problem hiding this comment.
It seems that we don't need it for point 1 because only the first call would need the preceding newline (we know within the function whether to insert a newline or not) and for point 2, we could similarly add the newline here?
There was a problem hiding this comment.
If we have a bunch of print_heading within a single suite I think the expectation is that there will be an empty line between those sub-sections of tests.. at least I imagine that is useful?
With your suggestion this PR would effectively change that behavior. Maybe that is fine?
There was a problem hiding this comment.
I just mean that within a testsuite we can add a print() before each subsection of the test, and in between testsuites, we'd add the newline after the code that I linked. Basically if we make each subsection end with an extra newline, and add an extra newline between each testsuite, then it should do what we want and we don't need the global logic.
There was a problem hiding this comment.
Sure, I can give that go.
No description provided.