We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
raises
1 parent 36b7d04 commit 489a90bCopy full SHA for 489a90b
pydocx/tests/test_docx.py
@@ -3,6 +3,7 @@
3
from tempfile import NamedTemporaryFile
4
5
from nose.plugins.skip import SkipTest
6
+from nose.tools import raises
7
8
from pydocx.tests import assert_html_equal, BASE_HTML
9
from pydocx.parsers.Docx2Html import Docx2Html
@@ -750,13 +751,10 @@ def test_missing_numbering():
750
751
''')
752
753
754
+@raises(MalformedDocxException)
755
def test_malformed_docx_exception():
756
with NamedTemporaryFile(suffix='.docx') as f:
- try:
- convert(f.name)
757
- raise AssertionError('MalformedDocxException was not raised')
758
- except MalformedDocxException:
759
- pass
+ convert(f.name)
760
761
762
def _converter(*args, **kwargs):
0 commit comments