Skip to content

Commit

Permalink
Merge pull request #5 from lone17/update-test
Browse files Browse the repository at this point in the history
update tests
  • Loading branch information
lone17 authored Jan 16, 2024
2 parents 9345db8 + a8c07fe commit a3421bf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MarkdownTidier,
filter_empty_sections,
find_highest_markdown_heading_level,
header_similarity_score,
heading_similarity_score,
merge_abstract_with_previous_sections,
preprocess_sections,
)
Expand Down Expand Up @@ -70,19 +70,19 @@ def test_preprocess_sections_fixed():
assert result == expected_sections


# The 'header_similarity_score' function can calculate the similarity score between two
# headers.
def test_header_similarity_score():
header1 = "This is a header"
header2 = "This is another header"
expected_score = 0.727272739669421
# The 'heading_similarity_score' function can calculate the similarity score between two
# headings.
def test_heading_similarity_score():
heading1 = "This is a heading"
heading2 = "This is another heading"
expected_score = 0.7391304461247632

score = header_similarity_score(header1, header2)
score = heading_similarity_score(heading1, heading2)

assert score == expected_score


# The 'filter_empty_sections' function can filter out sections with empty headers and
# The 'filter_empty_sections' function can filter out sections with empty headings and
# content.
def test_filter_empty_sections():
# Define input sections
Expand Down

0 comments on commit a3421bf

Please sign in to comment.