Sphinx test fixtures for pytest
Class |
|
Undocumented |
Function | app |
Provides the 'sphinx.application.Sphinx' object |
Function | app |
Parameters that are specified by 'pytest.mark.sphinx' for sphinx.application.Sphinx initialization |
Function | if |
The test will be skipped when using 'if_graphviz_found' fixture and graphviz dot command is not found. |
Function | make |
Provides make_app function to initialize SphinxTestApp instance. if you want to initialize 'app' in your test function. please use this instead of using SphinxTestApp class directory. |
Function | pytest |
Register custom markers |
Function | rollback |
Rollback sys.modules to its value before testing to unload modules during tests. |
Function | rootdir |
Undocumented |
Function | shared |
Undocumented |
Function | sphinx |
Temporary directory wrapped with `path` class. |
Function | status |
Back-compatibility for testing with previous @with_app decorator |
Function | tempdir |
Temporary directory wrapped with `path` class. This fixture is for back-compatibility with old test implementation. |
Function | test |
Test parameters that are specified by 'pytest.mark.test_params' |
Function | warning |
Back-compatibility for testing with previous @with_app decorator |
Constant | DEFAULT |
Undocumented |
Function | _shared |
Undocumented |
def app(test_params, app_params, make_app, shared_result): (source) ¶
Provides the 'sphinx.application.Sphinx' object
Parameters | |
testdict | Undocumented |
apptuple[ | Undocumented |
makeCallable | Undocumented |
sharedSharedResult | Undocumented |
Returns | |
Generator[ | Undocumented |
The test will be skipped when using 'if_graphviz_found' fixture and graphviz dot command is not found.
Parameters | |
app:SphinxTestApp | Undocumented |
Rollback sys.modules to its value before testing to unload modules during tests. For example, used in test_ext_autosummary.py to permit unloading the target module to clear its cache.
Back-compatibility for testing with previous @with_app decorator
Parameters | |
app:SphinxTestApp | Undocumented |
Returns | |
StringIO | Undocumented |
Test parameters that are specified by 'pytest.mark.test_params' :param Union[str] shared_result: If the value is provided, app._status and app._warning objects will be shared in the parametrized test functions and/or test functions that have same 'shared_result' value. **NOTE**: You can not specify both shared_result and srcdir.
Parameters | |
request:Any | Undocumented |
Returns | |
dict | Undocumented |
Back-compatibility for testing with previous @with_app decorator
Parameters | |
app:SphinxTestApp | Undocumented |
Returns | |
StringIO | Undocumented |