Merge pull request #3655 from tk0miya/compile_latex_only_on_py36

tests: compile by LaTeX only with py36
This commit is contained in:
Takeshi KOMIYA 2017-04-23 16:28:03 +09:00 committed by GitHub
commit 19323d232a
2 changed files with 10 additions and 1 deletions

View File

@ -52,4 +52,4 @@ install:
script:
- flake8
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then make style-check type-check test-async; fi
- if [[ $TRAVIS_PYTHON_VERSION != '3.6' ]]; then make test; fi
- if [[ $TRAVIS_PYTHON_VERSION != '3.6' ]]; then SKIP_LATEX_BUILD=1 make test; fi

View File

@ -87,6 +87,14 @@ def compile_latex_document(app):
app.config.latex_engine, p.returncode)
def skip_if_requested(testfunc):
if 'SKIP_LATEX_BUILD' in os.environ:
msg = 'Skip LaTeX builds because SKIP_LATEX_BUILD is set'
return skip_if(True, msg)(testfunc)
else:
return testfunc
def skip_if_stylefiles_notfound(testfunc):
if kpsetest(*STYLEFILES) is False:
msg = 'not running latex, the required styles do not seem to be installed'
@ -95,6 +103,7 @@ def skip_if_stylefiles_notfound(testfunc):
return testfunc
@skip_if_requested
@skip_if_stylefiles_notfound
@pytest.mark.parametrize(
"engine,docclass",