Skip to content

Commit

Permalink
Fixing unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Stormlighter committed Dec 9, 2023
1 parent 3f87a57 commit 9adaa42
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/spell_checking/test/test_integration_spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ def test_integration_spellchecker(self):
print(f'Spellchecked text: {output}')
status = bool(output == expected_text)

# Print expected and output text
print(f'Expected text: {expected_text}')
print(f'Output text: {output}')

# Inspect the content of the output file
with open("/watched/output/Test_File.txt", 'r', encoding="utf-8") as output_file:
print(f'Output file content: {output_file.read()}')
# Extract relevant text for comparison
relevant_output = [word for word in output if word not in ["file", "name:", "none", "uploader:", "none", "index:", "none", "title:"]]
relevant_expected = [word for word in expected_text if word not in ["file", "name:", "none", "uploader:", "none", "index:", "none", "title:"]]

#Assert
self.assertTrue(status, "The text was not extracted correctly")
Expand Down

0 comments on commit 9adaa42

Please sign in to comment.