Skip to content

Commit

Permalink
use getyear() instead of datetime.now().year
Browse files Browse the repository at this point in the history
  • Loading branch information
harryvu-futurehouse committed Jan 24, 2025
1 parent 007f740 commit 115efbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_configs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import warnings
from datetime import datetime
from unittest.mock import patch

import pytest
Expand All @@ -17,6 +16,7 @@
get_settings,
)
from paperqa.types import Doc, DocDetails
from paperqa.utils import get_year


def test_prompt_settings_validation() -> None:
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_matches_filter_criteria(doc_class, doc_data, filter_criteria, expected_


def test_citation_prompt_current_year():
expected_year_text = f"the current year is {datetime.now().year}"
expected_year_text = f"the current year is {get_year()}"

assert (
expected_year_text in citation_prompt
Expand Down

0 comments on commit 115efbb

Please sign in to comment.