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: network state (online/offline) affects epubcheck unit test outcome. #12094

Closed
jayaddison opened this issue Mar 14, 2024 · 1 comment · Fixed by #12095
Closed

tests: network state (online/offline) affects epubcheck unit test outcome. #12094

jayaddison opened this issue Mar 14, 2024 · 1 comment · Fixed by #12095

Comments

@jayaddison
Copy link
Contributor

Describe the bug

The test_run_epubcheck unit test case passes as expected when:

(note: we do enable DO_EPUBCHECK in our continous integration in the latex workflow -- and epubcheck is installed into the relevant sphinx-ci container image)

There are a few quirks here: I think that the test behaving differently offline isn't desirable though (or to phrase it another way: connectivity shouldn't be a requirement for most dependable software to test/build, because it's hard to predict when/where it will be rebuilt).

How to Reproduce

Ensure that epubcheck and the local development and test dependencies for sphinx are installed, and then disable network connectivity on the unit test host.

From the sphinx.git checkout directory:

$ DO_EPUBCHECK=1 pytest tests/test_builders/test_build_epub.py -k epubcheck

Environment Information

Platform:              linux; (Linux-6.6.15-rt-amd64-x86_64-with-glibc2.37)
Python version:        3.11.8 (main, Feb  7 2024, 21:52:08) [GCC 13.2.0])
Python implementation: CPython
Sphinx version:        7.3.0+/98d0cc860
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2


`epubcheck` v4.2.6 (Debian-packaged)

Sphinx extensions

N/A

Additional context

No response

@jayaddison
Copy link
Contributor Author

Output from epubcheck (dir paths filtered):

Validating using EPUB version 3.2 rules.
Messages: 0 fatals / 2 errors / 1 warning / 1 info

EPUBCheck completed

ERROR(OPF-014): /tmp/.../root/_build/epub/SphinxTests.epub/images.xhtml(-1,-1): The property "remote-resources" should be declared in the OPF file.
ERROR(RSC-006): /tmp/.../root/_build/epub/SphinxTests.epub/images.xhtml(28,120): Remote resource reference not allowed; resource must be placed in the OCF.
WARNING(NAV-011): /tmp/.../root/_build/epub/SphinxTests.epub/nav.xhtml(303,60): "toc" nav must be in reading order; link target "autodoc.xhtml#autodoc_target.Outer" is before the previous link’s target in document order.
INFO(INF-001): /tmp/.../root/_build/epub/SphinxTests.epub/nav.xhtml(303,60): The previous rule is under review and its severity may change in a future release. See the discussion at https://github.com/w3c/publ-epub-revision/issues/1283

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant