Skip to content

Commit

Permalink
[tests] Test month number as string
Browse files Browse the repository at this point in the history
  • Loading branch information
anjos committed Nov 6, 2024
1 parent 5342fdc commit 556f7bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tests/data/month-ordering/content/publications.bib
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ @misc{month-number
year = 2015,
month = 3,
}

@misc{month-number-string,
title = "Misc with numbered month",
author = "Author Last",
year = 2015,
month = "8",
}
3 changes: 2 additions & 1 deletion tests/test_pybtex.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def test_publications_month_ordering(
assert len(div) == 1

publication_keys = [
"month-number-string",
"month-long",
"month-number",
"month-short",
Expand All @@ -189,7 +190,7 @@ def test_publications_month_ordering(
_assert_log_no_errors(records)
_assert_log_contains(
records,
message="plugin detected 4 entries spread across 1 source file",
message="plugin detected 5 entries spread across 1 source file",
level=logging.INFO,
count=1,
)
Expand Down

0 comments on commit 556f7bf

Please sign in to comment.