sphinx-contrib / images

sphinxcontrib-images extension
Apache License 2.0
17 stars 14 forks source link

Add tests #25

Open jonascj opened 3 years ago

jonascj commented 3 years ago

At the moment there is only one collective integration test performed by Tox (via GitHub Actions, previously via Travis CI), and that is make -C docs html(see https://github.com/sphinx-contrib/images/blob/master/tox.ini).

That test only fails the package docs fail to build, it does not test if the docs are actually built correctly. I believe https://github.com/sphinx-contrib/images/pull/23 has shown this. With https://github.com/sphinx-contrib/images/pull/23 (commit 4d656516ca9453f46d158ca29a20fe8e22ff5674) and images_config = {'cache_path': '_custom_cache'} in conf.py downloaded/cached images are/were not copied to _build/html/_images correctly.

A manual test reveals this, but the amount of manual tests which needs to be conducted are growing. For version 0.9.3 a bug was fixed which caused docs to always rebuild files which did not change, that is also not guarded against by any tests.

Any contributions are welcome. My idea at the moment is to write tests which build the docs and parse the build log or parse the generated html-files.