-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve datafusion-cli
print format tests
#8896
Conversation
d7802a3
to
d1b0218
Compare
PrintFormat::Automatic, | ||
] { | ||
// no output for empty batches, even with header set | ||
PrintBatchesTest::new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this style of test is clearer what is expected and what is covered
PrintBatchesTest::new() | ||
.with_format(PrintFormat::Table) | ||
.with_batches(split_batch(three_column_batch())) | ||
.with_header(WithHeader::Ignored) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now there is additional coverage for formats that ignore the with_header
flag
d1b0218
to
d028441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks @alamb
Draft as it build on #8895
Which issue does this PR close?
Related to #8702
Follow on to #8895
Rationale for this change
While working on #8895 I found the tests somewhat hard to follow and it was hard for me to understand if there were existing tests that covered I was changing.
It was also hard top understand the coverage in general given how the tests were structured
What changes are included in this PR?
Are these changes tested?
This PR is all tests (no code changes)
Are there any user-facing changes?
No