Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/integration/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from version import __version__


def read_version_from_pyproject():
def read_version_from_pyproject() -> str:
"""Read version from pyproject.toml file."""
# it is not safe to just try to read version from pyproject.toml file directly
# the PDM tool itself is able to retrieve the version, even if the version
Expand All @@ -18,7 +18,7 @@ def read_version_from_pyproject():
return completed.stdout.decode("utf-8").strip()


def test_version_handling():
def test_version_handling() -> None:
"""Test how version is handled by the project."""
source_version = __version__
project_version = read_version_from_pyproject()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_lightspeed_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from lightspeed_stack import create_argument_parser


def test_create_argument_parser():
def test_create_argument_parser() -> None:
"""Test for create_argument_parser function."""
arg_parser = create_argument_parser()
# nothing more to test w/o actual parsing is done
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/utils/test_suid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
class TestSUID:
"""Unit tests for functions defined in utils.suid module."""

def test_get_suid(self):
def test_get_suid(self) -> None:
"""Test that get_suid generates a valid UUID."""
suid_value = suid.get_suid()
assert suid.check_suid(suid_value), "Generated SUID is not valid"
assert isinstance(suid_value, str), "SUID should be a string"

def test_check_suid_valid(self):
def test_check_suid_valid(self) -> None:
"""Test that check_suid returns True for a valid UUID."""
valid_suid = "123e4567-e89b-12d3-a456-426614174000"
assert suid.check_suid(
valid_suid
), "check_suid should return True for a valid SUID"

def test_check_suid_invalid(self):
def test_check_suid_invalid(self) -> None:
"""Test that check_suid returns False for an invalid UUID."""
invalid_suid = "invalid-uuid"
assert not suid.check_suid(
Expand Down
Loading