Skip to content

Commit

Permalink
Access to exception message with str(error.value)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Jun 30, 2019
1 parent 9d3d3cf commit 5ff1e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_cli.py
Expand Up @@ -931,7 +931,7 @@ def test_incorrect_notebook_causes_early_exit(tmpdir):
with pytest.raises(nbformat.reader.NotJSONError) as error:
jupytext([incorrect_ipynb, correct_ipynb, '--to', 'md'])

assert "Notebook does not appear to be JSON" in str(error)
assert "Notebook does not appear to be JSON" in str(error.value)

assert not os.path.exists(incorrect_md)
assert not os.path.exists(correct_md)
Expand Down

0 comments on commit 5ff1e18

Please sign in to comment.