Skip to content

Commit

Permalink
fix unitests
Browse files Browse the repository at this point in the history
  • Loading branch information
w5688414 committed Mar 20, 2024
1 parent 2851e4a commit 99458ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pipelines/tests/nodes/file_converter/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ def test_conversion(self):

expected_result = [
{
"content": " A Simple PDF File \n This is a small demonstration .pdf file - \n just for use in the Virtual Mechanics tutorials. More text. And more \n text. And more text. And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. And more text. Boring, zzzzz. And more text. And more text. And \n more text. And more text. And more text. And more text. And more text. \n And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. And more text. And more text. Even more. Continued on page 2 ...\x0c Simple PDF File 2 \n ...continued from page 1. Yet more text. And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. Oh, how boring typing this stuff. But not as boring as watching \n paint dry. And more text. And more text. And more text. And more text. \n Boring. More, a little more text. The end, and just as well. ",
"content": " A Simple PDF File \n This is a small demonstration .pdf file - \n just for use in the Virtual Mechanics tutorials. More text. And more \n text. And more text. And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. And more text. Boring, zzzzz. And more text. And more text. And \n more text. And more text. And more text. And more text. And more text. \n And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. And more text. And more text. Even more. Continued on page 2 ...",
"content_type": "text",
"meta": None,
}
},
{
"content": " Simple PDF File 2 \n ...continued from page 1. Yet more text. And more text. And more text. \n And more text. And more text. And more text. And more text. And more \n text. Oh, how boring typing this stuff. But not as boring as watching \n paint dry. And more text. And more text. And more text. And more text. \n Boring. More, a little more text. The end, and just as well. ",
"content_type": "text",
"meta": None,
},
]
result = converter.convert(file_path, process_num=1)
self.assertEqual(len(result), 2)
self.assertEqual(expected_result, result)

0 comments on commit 99458ca

Please sign in to comment.