Skip to content

Commit 435c92b

Browse files
committed
Fix pdf test
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 7a66be9 commit 435c92b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/textcode/test_pdf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ def test_get_text_lines_can_parse_faulty_broadcom_doc(self):
8080
def test_pdfminer_can_parse_apache_fop_test_pdf(self):
8181
test_file = self.get_test_loc('pdf/fop_test_pdf_1.5_test.pdf')
8282
result = pdf.get_text_lines(test_file)
83-
try:
84-
assert result == apache_fop_expected
85-
except AssertionError:
86-
assert result == apache_fop_expected_2020
83+
if result == apache_fop_expected:
84+
return
85+
assert result == apache_fop_expected_2020
8786

8887
def test_numbered_text_lines_does_not_fail_on_autocad_test_pdf(self):
8988
test_file = self.get_test_loc('pdf/AutoCad_Diagram.pdf')

0 commit comments

Comments
 (0)