Skip to content
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: Simplify pathlib PdfReader test #1056

Merged
merged 1 commit into from Jul 4, 2022
Merged

Conversation

MasterOdin
Copy link
Member

The Path constructor allows a variable amount of arguments to it which it joins together similar to os.path.join works, so it's not necessary to use os.path.join before passing the args to Path.

REPL example:

>>> os.path.join(RESOURCES_PATH, 'crazyones.pdf')
'/Users/mpeveler/code/github/PyPDF2/resources/crazyones.pdf'
>>> Path(os.path.join(RESOURCES_PATH, 'crazyones.pdf'))
PosixPath('/Users/mpeveler/code/github/PyPDF2/resources/crazyones.pdf')
>>> Path(RESOURCES_PATH, 'crazyones.pdf')
PosixPath('/Users/mpeveler/code/github/PyPDF2/resources/crazyones.pdf')

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #1056 (c7bb611) into main (32ab2a3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1056   +/-   ##
=======================================
  Coverage   90.92%   90.92%           
=======================================
  Files          24       24           
  Lines        4508     4508           
  Branches      921      921           
=======================================
  Hits         4099     4099           
  Misses        267      267           
  Partials      142      142           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32ab2a3...c7bb611. Read the comment docs.

@MartinThoma MartinThoma merged commit 4a62a47 into main Jul 4, 2022
@MartinThoma MartinThoma deleted the maint-reader-path-test branch July 4, 2022 16:55
@MartinThoma
Copy link
Member

Nice! I keep forgetting to use Pathlib 🙈

Thank you for improving PyPDF2 ❤️

MartinThoma added a commit that referenced this pull request Jul 5, 2022
New Features (ENH):
-  Add PdfReader.xfa attribute (#1026)

Bug Fixes (BUG):
-  Wrong page inserted when PdfMerger.merge is done (#1063)
-  Resolve IndirectObject when it refers to a free entry (#1054)

Developer Experience (DEV):
-  Added {posargs} to tox.ini (#1055)

Maintenance (MAINT):
-  Remove PyPDF2._utils.bytes_type (#1053)

Testing (TST):
-  Scale page (indirect rect object) (#1057)
-  Simplify pathlib PdfReader test (#1056)
-  IndexError of VirtualList (#1052)
-  Invalid XML in xmp information (#1051)
-  No pycryptodome (#1050)
-  Increase test coverage (#1045)

Code Style (STY):
-  DOC of compress_content_streams (#1061)
-  Minimize diff for #879 (#1049)

Full Changelog: 2.4.1...2.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants