-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat/add include_slide_notes parameter #455
Conversation
) | ||
df = pd.read_csv(io.StringIO(response.text)) | ||
|
||
if include_slide_notes or test_default: |
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.
This is heavy nit pick and don't feel obligated to update this test, but consider this a hint for the future ;)
There is a good practice in writing unit tests, or at least convention how unit tests can be named called given-when-then (much more popular in java where long function names are more natural).
check eg URL
So instead of putting logic in the test when something is expected I would create 2/3 tests like:
test_given_note_in_slide_when_variable_not_set_then_note_extracted
(avoid keywords, and you will be able create reasonable unit test name under 100 chars ;) )
this way you won't have to guess which part of the unit test was executed (avoid if/else), avoid putting strange logic parameteres inside test parametrization, won't do mistake in logic and the test will be much more self explaining ;)
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.
Wow, thank you so much for that detailed advice! Next time, I will consider splitting these kinds of tests rather than parameterizing one to contain so many cases. I will also work on improving the naming conventions. Great idea!
Hey @awalker4, |
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! On the element order differences, I think it's worth adding another sentence in the changelog, but that's probably all I'd do in this case. Thanks!
Description
include_slide_notes
parameter, default isTrue
. Works for.ppt
and.pptx
file extensions.sample-docs
:sample-docs/notes.ppt
,sample-docs/notes.pptx
that include notes on their slides. This is to easily test the functionality, as there are no existing PowerPoint files that include slide notes.Testing
Same with file
notes.ppt