Skip to content

Commit

Permalink
Add a test for Version.filter with default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 8, 2024
1 parent 978b8ec commit 67842fd
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/test_build_docs_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
from build_docs import Version


def test_filter() -> None:
def test_filter_default() -> None:
# Arrange
versions = [
Version("3.14", status="feature"),
Version("3.13", status="bugfix"),
Version("3.12", status="bugfix"),
Version("3.11", status="security"),
Version("3.10", status="security"),
Version("3.9", status="security"),
]

# Act
filtered = Version.filter(versions)

# Assert
assert filtered == [
Version("3.14", status="feature"),
Version("3.13", status="bugfix"),
Version("3.12", status="bugfix"),
]


def test_filter_one() -> None:
# Arrange
versions = [
Version("3.14", status="feature"),
Expand Down

0 comments on commit 67842fd

Please sign in to comment.