Skip to content

Commit

Permalink
Fix tests again.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Aug 1, 2017
1 parent 9266a3d commit f4ebb20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions abilian/services/conversion/handlers.py
Expand Up @@ -8,7 +8,6 @@
import os
import re
import subprocess
import sys
import threading
import traceback
from abc import ABCMeta, abstractmethod
Expand Down Expand Up @@ -414,7 +413,7 @@ def run_soffice():
self._process.communicate()
except Exception as e:
logger.error('soffice error: %s', bytes(e), exc_info=True)
raise_from(ConversionError('unoconv failed'), e)
raise_from(ConversionError('soffice conversion failed'), e)

run_thread = threading.Thread(target=run_soffice)
run_thread.start()
Expand Down
2 changes: 2 additions & 0 deletions abilian/services/conversion/tests.py
Expand Up @@ -42,11 +42,13 @@ def test_pdf_to_text(converter):
text = converter.to_text("", blob, "application/pdf")


@pytest.mark.skipif(not HAS_LIBREOFFICE, reason="requires libreoffice")
def test_word_to_text(converter):
blob = read_file("test.doc")
text = converter.to_text("", blob, "application/msword")


@pytest.mark.skipif(not HAS_LIBREOFFICE, reason="requires libreoffice")
def test_wordx_to_text(converter):
blob = read_file("test.docx")
text = converter.to_text("", blob, "application/msword")
Expand Down

0 comments on commit f4ebb20

Please sign in to comment.