diff options
author | Ram Rachum <ram@rachum.com> | 2020-06-14 00:46:19 +0300 |
---|---|---|
committer | Ram Rachum <ram@rachum.com> | 2020-06-14 14:37:16 +0300 |
commit | 53c1dff91c0b7100e1ce1b51acbf0fffbc10cf9c (patch) | |
tree | 93bca0f98dfcf0f83f32987f898a7fbafe8f25dd /tests | |
parent | 0fc97a0b56d31f2703ff42dfe946e8d11d667909 (diff) | |
download | sphinx-git-53c1dff91c0b7100e1ce1b51acbf0fffbc10cf9c.tar.gz |
Fix exception causes all over the codebase
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_build_latex.py | 6 | ||||
-rw-r--r-- | tests/test_build_texinfo.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index d3c491461..3bf6edd66 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -64,8 +64,8 @@ def compile_latex_document(app, filename='python.tex'): '-output-directory=%s' % app.config.latex_engine, filename] subprocess.run(args, stdout=PIPE, stderr=PIPE, check=True) - except OSError: # most likely the latex executable was not found - raise pytest.skip.Exception + except OSError as exc: # most likely the latex executable was not found + raise pytest.skip.Exception from exc except CalledProcessError as exc: print(exc.stdout) print(exc.stderr) @@ -1545,7 +1545,7 @@ def test_texescape_for_unicode_supported_engine(app, status, warning): assert 'superscript: ⁰, ¹' in result assert 'subscript: ₀, ₁' in result - + @pytest.mark.sphinx('latex', testroot='basic', confoverrides={'latex_elements': {'extrapackages': r'\usepackage{foo}'}}) def test_latex_elements_extrapackages(app, status, warning): diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py index 378eaa192..9833218d7 100644 --- a/tests/test_build_texinfo.py +++ b/tests/test_build_texinfo.py @@ -58,8 +58,8 @@ def test_texinfo(app, status, warning): try: args = ['makeinfo', '--no-split', 'sphinxtests.texi'] subprocess.run(args, stdout=PIPE, stderr=PIPE, cwd=app.outdir, check=True) - except OSError: - raise pytest.skip.Exception # most likely makeinfo was not found + except OSError as exc: + raise pytest.skip.Exception from exc # most likely makeinfo was not found except CalledProcessError as exc: print(exc.stdout) print(exc.stderr) |