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

Fixed font-related test error on some platforms #1577

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jmwright
Copy link
Member

Uses the logo that is embedded in the repo for CadQuery's logo in order to prevent text alignment test failures across platforms.

Closes #1569 and #187

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.15%. Comparing base (5522037) to head (e46edd4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1577      +/-   ##
==========================================
+ Coverage   94.54%   95.15%   +0.61%     
==========================================
  Files          28       28              
  Lines        5848     7252    +1404     
  Branches     1166     1598     +432     
==========================================
+ Hits         5529     6901    +1372     
- Misses        193      212      +19     
- Partials      126      139      +13     

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

Copy link
Member

@adam-urbanczyk adam-urbanczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some cosmetics

tests/test_cadquery.py Outdated Show resolved Hide resolved
@@ -24,7 +25,8 @@
)

# test data directory
testdataDir = os.path.join(os.path.dirname(__file__), "testdata")
testdataDir = Path(os.path.dirname(__file__), "testdata")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using only pathlib it could be:

testdataDir = Path(__file__).parent.joinpath("testdata")
testFont = str(testdataDir.joinpath("OpenSans-Regular.ttf"))

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.

Text Alignment Test Failure
3 participants