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

Add tests #38

Closed
melissawm opened this issue Jan 28, 2023 · 3 comments · Fixed by #59
Closed

Add tests #38

melissawm opened this issue Jan 28, 2023 · 3 comments · Fixed by #59
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@melissawm
Copy link
Owner

For now, the documentation itself serves as tests for the current features, but this doesn't test (for example) the use of symlinked directories. We should have a proper test suite for the extension.

@melissawm melissawm added enhancement New feature or request help wanted Extra attention is needed labels Jan 28, 2023
@JWCook
Copy link
Collaborator

JWCook commented Jul 19, 2023

I think there are two options for this:

  1. Unit test: mock everything (Sphinx app and config objects, etc.), and test individual classes and functions
  2. Integration test: Use a full build environment with some test source files and expected HTML output

Option 1 would probably be more straightforward to write (without much knowledge of Sphinx internals), but option 2 would be more thorough. I'm not sure how best to set up a build environment for testing, but I'm curious, so I'm willing to look into it.

Sphinx has a sphinx.testing subpackage that doesn't appear to be documented, but looks potentially useful: https://github.com/sphinx-doc/sphinx/tree/master/sphinx/testing

@JWCook
Copy link
Collaborator

JWCook commented Jul 20, 2023

sphinx.testing looks like the best option for most of the things we would want to test. If that sounds good to you, I'll plan on getting that started with a few basic tests.

@melissawm
Copy link
Owner Author

I'd be happy to see that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants