tests: compile by LaTeX only with py36

This commit is contained in:
Takeshi KOMIYA
2017-04-22 18:14:06 +09:00
parent 45887c7d62
commit 3cf1883356
2 changed files with 10 additions and 1 deletions

View File

@@ -51,4 +51,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",