Skip to content

Commit 3d1d931

Browse files
committed
fix tests
1 parent 2f98e40 commit 3d1d931

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_grobid_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_process_with_pdf_files(self, mock_print, mock_walk):
259259
with patch('grobid_client.grobid_client.GrobidClient._test_server_connection'):
260260
with patch('grobid_client.grobid_client.GrobidClient._configure_logging'):
261261
with patch('grobid_client.grobid_client.GrobidClient.process_batch') as mock_batch:
262-
mock_batch.return_value = (2, 0) # Return tuple as expected
262+
mock_batch.return_value = (2, 0, 0) # Return tuple as expected (processed, errors, skipped)
263263
client = GrobidClient(check_server=False)
264264
client.logger = Mock()
265265

@@ -424,7 +424,7 @@ def test_process_batch(self, mock_isfile, mock_executor):
424424
verbose=False
425425
)
426426

427-
assert result == (1, 0) # One file processed, zero errors
427+
assert result == (1, 0, 0) # One file processed, zero errors, zero skipped
428428

429429

430430
class TestVerboseParameter:
@@ -508,7 +508,7 @@ def test_process_batch_empty_input_files(self, mock_configure_logging, mock_test
508508
markdown_output=False
509509
)
510510

511-
assert result == (0, 0) # No files processed, no errors
511+
assert result == (0, 0, 0) # No files processed, no errors, no skipped
512512

513513
@patch('grobid_client.grobid_client.GrobidClient._test_server_connection')
514514
@patch('grobid_client.grobid_client.GrobidClient._configure_logging')

tests/test_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_batch_processing(self):
181181
force=True
182182
)
183183

184-
assert processed_count == (5, 0)
184+
assert processed_count == (5, 0, 0)
185185

186186
def test_error_handling_and_recovery(self):
187187
"""Test error handling and recovery mechanisms."""
@@ -342,4 +342,4 @@ def test_concurrent_processing_stress(self):
342342
force=True
343343
)
344344

345-
assert processed_count == (20, 0)
345+
assert processed_count == (20, 0, 0)

0 commit comments

Comments
 (0)