Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferjiangkells committed Jul 30, 2024
1 parent 971c760 commit b638036
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/miade/annotators.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def preprocess(self, note: Note, refine: bool = True) -> Note:
Args:
note (Note): The input note to preprocess.
refine (bool): Whether to refine the paragraph detection algorithm and allow merging of continuous prose
paragraphs, merging to paragraphs with empty bodies with the next prose paragraphs
paragraphs, merging to paragraphs with empty bodies with the next prose paragraphs. Default True.
Returns:
The preprocessed note.
Expand Down
6 changes: 4 additions & 2 deletions tests/test_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
)


def test_note_cleaning_and_paragraphing(test_problems_medcat_model, test_clean_and_paragraphing_note):
def test_note_cleaning_and_paragraphing_naive(test_problems_medcat_model, test_clean_and_paragraphing_note):
annotator = ProblemsAnnotator(test_problems_medcat_model)
annotator.preprocess(test_clean_and_paragraphing_note)
annotator.preprocess(test_clean_and_paragraphing_note, refine=False)
for paragraph in test_clean_and_paragraphing_note.paragraphs:
print(paragraph)

assert test_clean_and_paragraphing_note.paragraphs == [
Paragraph(heading="", body="", type=ParagraphType.prose, start=0, end=182),
Expand Down

0 comments on commit b638036

Please sign in to comment.