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

[tests] epub: skip the epubcheck test if Java or epubcheck itself are not found #12098

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

  • The test_run_epubcheck test has to be enabled explicitly by the environment setting the DO_EPUBCHECK variable. For the test to pass without indicating any problems when the test did not exercise any behaviour or check any results seems wrong - it could result in test reports that produce a false sense of confidence.

Detail

  • Instead of reporting success when the test_run_epubcheck does nothing due to the apparent absense of either Java or epubcheck.jar on the host, use pytest to indicate a skip result.

Relates

@jayaddison
Copy link
Contributor Author

Output when java is found not runnable on the host:

tests/test_builders/test_build_epub.py ..........s..                                                   [100%]

========================================== short test summary info ===========================================
SKIPPED [1] tests/test_builders/test_build_epub.py:382: Unable to run Java; skipping test
======================================= 12 passed, 1 skipped in 3.73s ========================================

Output when epubcheck.jar is found unavailable on the host:

tests/test_builders/test_build_epub.py ..........s..                                                   [100%]

========================================== short test summary info ===========================================
SKIPPED [1] tests/test_builders/test_build_epub.py:386: Could not find epubcheck; skipping test
======================================= 12 passed, 1 skipped in 3.85s ========================================

@jayaddison jayaddison changed the title tests: epub: skip the epubcheck test if Java or epubcheck itself are not found [tests] epub: skip the epubcheck test if Java or epubcheck itself are not found Mar 15, 2024
@picnixz
Copy link
Member

picnixz commented Mar 15, 2024

Ah ! thank you ! I had this change in my huge re-implementation but forgot about it. So thanks for that.

@picnixz picnixz merged commit 5695b76 into sphinx-doc:master Mar 15, 2024
22 checks passed
@picnixz
Copy link
Member

picnixz commented Mar 15, 2024

Thank you!

@jayaddison
Copy link
Contributor Author

Thanks!

@jayaddison jayaddison deleted the tests/epubcheck-dont-indicate-noop-success branch March 15, 2024 12:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants