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

Add tests in test_painter.py to Pytest marker unit #77

Merged
merged 2 commits into from
Nov 19, 2023

Conversation

felix-seifert
Copy link
Collaborator

I discovered that we have some more unit tests. They should receive the Pytest marker unit to be automatically executed in our CI workflow.

@felix-seifert felix-seifert marked this pull request as draft November 6, 2023 20:51
@felix-seifert
Copy link
Collaborator Author

@csgoh Can you please have a look at the test failures?

The test src/tests/test_painter.py::TestPainter::test_get_text_dimension2 fails on Ubuntu. The problem seems to be that the text_width is not the expected range. If I run the test on my computer (it is an Ubuntu), everything is fine. Maybe, you have an idea about the dependant library and how to cope with the problem.

@csgoh
Copy link
Owner

csgoh commented Nov 9, 2023

Hi @felix-seifert

Sorry for not responding earlier, as I am still on holiday 😄 I will be back by end of this month.

Regarding the error, I suspect it is a font file issue. I understand the Arial font by default does not come with Linux. Can I suggest we try using SourceHanSerifTC-Bold.otf in the font folder?

CS

@felix-seifert felix-seifert force-pushed the felix-seifert/add-test-painter branch from e814dbf to 54a6703 Compare November 9, 2023 22:23
@felix-seifert felix-seifert force-pushed the felix-seifert/add-test-painter branch from 54a6703 to 366ac95 Compare November 9, 2023 22:25
@felix-seifert
Copy link
Collaborator Author

Just realised that the test specifies the usage of Arial. 🙈 I fixed the two tests in my last commit to this PR.

I had a closer look at the other tests in the file and I thought we do not rely on Arial anymore. We wanted to ensure that we can generate roadmaps out of the box on every OS. Nevertheless, this test shows that the theme ORANGEPEEL uses Arial. Do we actually say that we except that the standard version works without Arial and the theme is already custom?

@felix-seifert felix-seifert marked this pull request as ready for review November 9, 2023 22:27
@felix-seifert felix-seifert requested a review from csgoh November 11, 2023 16:41
@csgoh csgoh merged commit c50af02 into csgoh:main Nov 19, 2023
10 checks passed
@felix-seifert felix-seifert deleted the felix-seifert/add-test-painter branch November 20, 2023 07:46
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.

2 participants