Skip to content

Chromium test is not a unit test#219

Merged
larsks merged 2 commits into
CCI-MOC:mainfrom
larsks:fix/chromium-test
Jul 16, 2025
Merged

Chromium test is not a unit test#219
larsks merged 2 commits into
CCI-MOC:mainfrom
larsks:fix/chromium-test

Conversation

@larsks

@larsks larsks commented Jul 15, 2025

Copy link
Copy Markdown
Member

Relocate tests/unit/test_chromium.py to tests/integration/test_chromium.py.

The chromium test is not a unit test -- it has an external dependency on
Chromium. By relocating it to tests/integration, we ensure that the unit
tests run without errors.

This commit also contains some minor changes to suppress warnings from
strict type checkers.

@larsks larsks requested review from KelvinLinBU and QuanMPhm July 15, 2025 14:46
@QuanMPhm QuanMPhm requested a review from knikolla July 15, 2025 15:21

@KelvinLinBU KelvinLinBU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

Comment thread process_report/tests/unit/invoices/test_pi_specific_invoice.py Outdated
Relocate tests/unit/test_chromium.py to tests/integration/test_chromium.py.

The chromium test is not a unit test -- it has an external dependency on
Chromium. By relocating it to tests/integration, we ensure that the unit
tests run without errors.

This commit also contains some minor changes to suppress warnings from
strict type checkers.
@larsks larsks force-pushed the fix/chromium-test branch from 4d25aa5 to 98091fb Compare July 15, 2025 15:46
@larsks larsks requested a review from QuanMPhm July 15, 2025 16:02
@QuanMPhm QuanMPhm requested a review from naved001 July 15, 2025 20:21
@QuanMPhm

Copy link
Copy Markdown
Contributor

@naved001 @knikolla Just need a pass from either of you

Comment thread process_report/invoices/pi_specific_invoice.py
The chrome binary used for pdf generation is controlled by the
CHROME_BIN_PATH environment variable, but the test in in
process_report/tests/integration/test_chromium.py expected the literal path
`/usr/bin/chromium`. This would cause the tests to fail if run in an
environment in which chromium was not installed, even if the code
successfully used an alternate path.
@larsks larsks force-pushed the fix/chromium-test branch from 98091fb to 723d223 Compare July 16, 2025 02:28
@larsks larsks merged commit 38d7036 into CCI-MOC:main Jul 16, 2025
5 checks passed
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.

4 participants