mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve LaTeX skip decorators
This commit is contained in:
@@ -77,20 +77,14 @@ def compile_latex_document(app, filename='projectnamenotset.tex', docclass='manu
|
|||||||
raise AssertionError(msg) from exc
|
raise AssertionError(msg) from exc
|
||||||
|
|
||||||
|
|
||||||
def skip_if_requested(testfunc):
|
skip_if_requested = pytest.mark.skipif(
|
||||||
if 'SKIP_LATEX_BUILD' in os.environ:
|
'SKIP_LATEX_BUILD' in os.environ,
|
||||||
msg = 'Skip LaTeX builds because SKIP_LATEX_BUILD is set'
|
reason='Skip LaTeX builds because SKIP_LATEX_BUILD is set',
|
||||||
return pytest.mark.skipif(True, reason=msg)(testfunc)
|
)
|
||||||
else:
|
skip_if_stylefiles_notfound = pytest.mark.skipif(
|
||||||
return testfunc
|
not kpsetest(*STYLEFILES),
|
||||||
|
reason='not running latex, the required styles do not seem to be installed',
|
||||||
|
)
|
||||||
def skip_if_stylefiles_notfound(testfunc):
|
|
||||||
if kpsetest(*STYLEFILES) is False:
|
|
||||||
msg = 'not running latex, the required styles do not seem to be installed'
|
|
||||||
return pytest.mark.skipif(True, reason=msg)(testfunc)
|
|
||||||
else:
|
|
||||||
return testfunc
|
|
||||||
|
|
||||||
|
|
||||||
class RemoteImageHandler(http.server.BaseHTTPRequestHandler):
|
class RemoteImageHandler(http.server.BaseHTTPRequestHandler):
|
||||||
|
|||||||
Reference in New Issue
Block a user