File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
libs/unstructured/tests/integration_tests Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -193,17 +193,16 @@ def test_loader_partitions_multiple_via_api() -> None:
193193 assert docs [- 1 ].metadata .get ("filename" ) == "fake-email-attachment.eml"
194194
195195
196- def test_loader_partition_via_api_raises_TypeError_with_invalid_arg () -> None :
197- file_path = os .path .join (EXAMPLE_DOCS_DIRECTORY , "layout-parser-paper.pdf " )
196+ def test_loader_partition_via_api_ignores_invalid_arg () -> None :
197+ file_path = os .path .join (EXAMPLE_DOCS_DIRECTORY , "fake-email-attachment.eml " )
198198 loader = UnstructuredLoader (
199199 file_path = file_path ,
200200 api_key = UNSTRUCTURED_API_KEY ,
201201 partition_via_api = True ,
202- mode = "elements" ,
202+ mode = "elements" , # mode is no longer a valid argument and is ignored
203203 )
204204
205- with pytest .raises (TypeError ):
206- loader .load ()
205+ loader .load ()
207206
208207
209208def test_loader_partitions_via_api_hi_res () -> None :
@@ -217,7 +216,7 @@ def test_loader_partitions_via_api_hi_res() -> None:
217216
218217 docs = loader .load ()
219218
220- categories = set (doc .metadata .get ("category" ) for doc in docs )
219+ categories : set [ str ] = set (doc .metadata .get ("category" ) for doc in docs )
221220 assert "Table" in categories
222221 assert "Image" in categories
223222
You can’t perform that action at this time.
0 commit comments