Skip to content

Commit

Permalink
fix: formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fg-nava committed Dec 18, 2024
1 parent 7c2e809 commit da6ddfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/tests/src/ingestion/test_pdf_stylings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_styling_dataclass():
pageno=1,
headings=[Heading(title="Test Heading", level=1, pageno=1)],
wider_text="test text in context",
bold=True
bold=True,
)
assert styling.text == "test text"
assert styling.pageno == 1
Expand Down
9 changes: 3 additions & 6 deletions app/tests/src/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
FormattingConfig,
_format_guru_to_accordion_html,
_get_breadcrumb_html,
build_accordions,
format_guru_cards,
reify_citations,
build_accordions,
)
from src.retrieve import retrieve_with_scores
from tests.src.db.models.factories import ChunkFactory
Expand Down Expand Up @@ -103,16 +103,13 @@ def test_reify_citations():
subsections = split_into_subsections(chunks, factory=CitationFactory())
config = FormattingConfig()

assert (
reify_citations("This is a citation (citation-0)", [], config, None)
== "This is a citation "
)
assert reify_citations("This is a citation (citation-0)", [], config, None) == "This is a citation "

result = reify_citations(
f"This is a citation ({subsections[0].id}) and another ({subsections[1].id}).",
subsections,
config,
None
None,
)

# Check that citations were added
Expand Down

0 comments on commit da6ddfc

Please sign in to comment.