Skip to content

Commit

Permalink
chore(tests[version]): pydocstyle manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 25, 2023
1 parent bd73619 commit 0456fca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Tests for version comparison."""
import operator
import typing as t
from contextlib import nullcontext as does_not_raise
Expand Down Expand Up @@ -30,10 +31,13 @@
],
)
def test_version(version: str) -> None:
"""Assert LooseVersion constructor against various version strings."""
assert LooseVersion(version)


class VersionCompareFixture(t.NamedTuple):
"""Test fixture for version comparison."""

a: object
op: "VersionCompareOp"
b: object
Expand Down Expand Up @@ -61,6 +65,7 @@ def test_version_compare(
b: str,
raises: t.Union[t.Type[Exception], bool],
) -> None:
"""Assert version comparisons."""
raises_ctx: "RaisesContext[Exception]" = (
pytest.raises(t.cast(t.Type[Exception], raises))
if raises
Expand Down

0 comments on commit 0456fca

Please sign in to comment.