-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
TST: More Unit tests #831
TST: More Unit tests #831
Conversation
Codecov Report
@@ Coverage Diff @@
## main #831 +/- ##
==========================================
+ Coverage 77.20% 80.62% +3.42%
==========================================
Files 12 12
Lines 3540 3572 +32
Branches 830 821 -9
==========================================
+ Hits 2733 2880 +147
+ Misses 590 511 -79
+ Partials 217 181 -36
Continue to review full report at Codecov.
|
Tests/test_generic.py
Outdated
@pytest.mark.parametrize("value, expected", [(b"true", b"true"), (b"false", b"false")]) | ||
def test_boolean_object(value, expected): | ||
stream = BytesIO(value) | ||
BooleanObject.readFromStream(stream) |
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.
We should have an assert on what this returns? Unless the point of the test is just validating it doesn't mutate the input stream beyond reading through it...
Could also add a test case for b"fals"
since that looks like it'll parse the same as b"false"
and perhaps useful to capture that info? We may also with to capture that it leaves the incoming stream at the end of it?
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.
We should have an assert on what this returns?
Good point, I completely missed that it returns something 👍
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.
capture that it leaves the incoming stream at the end of it
Also a good idea. I've just added it 👍
* BUG: StopIteration got deprecated in Python 3.7, see PEP 479 * STY: Use property decorator Co-authored-by: Matthew Peveler <[email protected]>
* BUG: StopIteration got deprecated in Python 3.7, see PEP 479 * STY: Use property decorator Co-authored-by: Matthew Peveler <[email protected]>
Robustness (ROB): - Handle missing destinations in reader (#840) - warn-only in readStringFromStream (#837) - Fix corruption in startxref or xref table (#788 and #830) Documentation (DOC): - Project Governance (#799) - History of PyPDF2 - PDF feature/version support (#816) - More details on text parsing issues (#815) Developer Experience (DEV): - Add benchmark command to Makefile - Ignore IronPython parts for code coverage (#826) Maintenance (MAINT): - Split pdf module (#836) - Separated CCITTFax param parsing/decoding (#841) - Update requirements files Testing (TST): - Use external repository for larger/more PDFs for testing (#820) - Swap incorrect test names (#838) - Add test for PdfFileReader and page properties (#835) - Add tests for PyPDF2.generic (#831) - Add tests for utils, form fields, PageRange (#827) - Add test for ASCII85Decode (#825) - Add test for FlateDecode (#823) - Add test for filters.ASCIIHexDecode (#822) Code Style (STY): - Apply pre-commit (black, isort) + use snake_case variables (#832) - Remove debug code (#828) - Documentation, Variable names (#839) Full Changelog: 1.27.9...1.27.10
No description provided.