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

TST: migrate test output to minimal build #87

Open
story645 opened this issue Dec 8, 2023 · 3 comments
Open

TST: migrate test output to minimal build #87

story645 opened this issue Dec 8, 2023 · 3 comments

Comments

@story645
Copy link
Collaborator

story645 commented Dec 8, 2023

I think it'd be easier to test the behavior of directives and if there were sample built pages to look out. As a model, matplotlib and sphinx gallery both build minimal documents to test their directives:

TL;DR is that tinybuild is designed as a minimal full sphinx doc build that you can run with make html from the tinybuild/doc to get a traditional build experience, but also gets run in test_full.py so you can check for html or rst output. So basically you can think of stuff in test_full.py as pytests that have access to a full site built with sphinx-build.

One gotcha at the moment is that you might need to run make clean in tinybuild/doc for the pytest version to run properly

Originally posted by @larsoner in sphinx-gallery/sphinx-gallery#1222 (comment)

This isn't too different from the current sample output but I think more robust.

@JWCook
Copy link
Collaborator

JWCook commented Dec 10, 2023

In what ways would this be more robust? Could you give an example?

@story645
Copy link
Collaborator Author

In what ways would this be more robust?

  1. generates all the output types, so you can easily test the html directly and that the other sphinx pages build
  2. the ability to build the tinybuild docs independent of the tests makes it much easier to debug whether a test input is bad or the test is bad and why something is failing. Yes I can chase down the pytest cache directory but this is much easier.

@JWCook
Copy link
Collaborator

JWCook commented Dec 11, 2023

Okay, that makes sense. Thanks for the details! Sounds good to me.

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

No branches or pull requests

2 participants