Skip to content

TST: Skip tests using fpdf2 if it's not installed#2419

Merged
MartinThoma merged 1 commit intomainfrom
tst-skipif-fpdf
Jan 21, 2024
Merged

TST: Skip tests using fpdf2 if it's not installed#2419
MartinThoma merged 1 commit intomainfrom
tst-skipif-fpdf

Conversation

@MartinThoma
Copy link
Copy Markdown
Member

The Debian ecosystem installs only packages which are also present in the Debian ecosystem for testing. This includes pytest, but it does not include fpdf2.

Adding the line 'pytest.importorskip("fpdf")' within the test and before the import ensures that pytest skips the test in case fpdf is not installed.

Closes #2408

The Debian ecosystem installs only packages which are also present
in the Debian ecosystem for testing. This includes pytest, but it
does not include fpdf2.

Adding the line 'pytest.importorskip("fpdf")' within the test
and before the import ensures that pytest skips the test in
case fpdf is not installed.

Closes #2408
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (26b9a97) 94.42% compared to head (3b7fe3f) 94.42%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2419   +/-   ##
=======================================
  Coverage   94.42%   94.42%           
=======================================
  Files          49       49           
  Lines        8007     8007           
  Branches     1616     1616           
=======================================
  Hits         7561     7561           
  Misses        276      276           
  Partials      170      170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MartinThoma MartinThoma merged commit 54ae0a6 into main Jan 21, 2024
@MartinThoma MartinThoma deleted the tst-skipif-fpdf branch January 21, 2024 19:08
MartinThoma added a commit that referenced this pull request Jan 28, 2024
## What's new

### Bug Fixes (BUG)
-  layout mode text extraction ZeroDivisionError (#2417) by @shartzog

### Testing (TST)
-  Skip tests using fpdf2 if it\'s not installed (#2419) by @MartinThoma

[Full Changelog](4.0.0...4.0.1)
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.

Skip test if fpdf is not available

1 participant