Move test utilities into a sphinx submodule.

Matthias Troffaes avatarMatthias Troffaes created an issue

I found myself repeatedly copying util.py and path.py from Sphinx's test suite into my own code, to aid testing of extensions. Would it be worth moving these two files into the Sphinx package (say under sphinx.test or sphinx.util.test), and perhaps provide some documentation, to aid testing of extensions in general, saving folks from having to copy these files, and maybe also improving the ease by which folks can write tests for their extension modules?

A potential downside of doing this would be to have to stick to a reasonably stable API for Sphinx tests. It would also "pollute" the Sphinx package with test code which most users will never run (I don't necessarily see this as an issue, but...).

I'd be happy to set up a pull request for this.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.