Skip to content

Commit

Permalink
Merge pull request sphinx-doc#3655 from tk0miya/compile_latex_only_on…
Browse files Browse the repository at this point in the history
…_py36

tests: compile by LaTeX only with py36
  • Loading branch information
tk0miya authored Apr 23, 2017
2 parents bd7fccb + 3cf1883 commit 19323d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions tests/test_build_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -95,6 +103,7 @@ def skip_if_stylefiles_notfound(testfunc):
return testfunc


@skip_if_requested
@skip_if_stylefiles_notfound
@pytest.mark.parametrize(
"engine,docclass",
Expand Down

0 comments on commit 19323d2

Please sign in to comment.