Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Stormlighter committed Dec 9, 2023
1 parent 9adaa42 commit b4de206
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/spell_checking/test/test_integration_spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@ 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()}')

exclude_words = ["file", "name:", "none", "uploader:", "none", "index:", "none", "title:"]

# 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:"]]
relevant_output = [word for word in output if word not in exclude_words]
relevant_expected = [word for word in expected_text if word not in exclude_words]

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

0 comments on commit b4de206

Please sign in to comment.