added strict mypy checks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Unittests for the readable function."""
|
||||
|
||||
import pytest
|
||||
from typing import Any
|
||||
|
||||
from python_utils import readable_unit
|
||||
|
||||
@@ -31,7 +32,11 @@ TEST_CASES = [
|
||||
|
||||
|
||||
@pytest.mark.parametrize("value, unit, expected", TEST_CASES)
|
||||
def test_readable_unit(value, unit, expected):
|
||||
def test_readable_unit(
|
||||
value: Any, # Allow invalid types for testing
|
||||
unit: Any, # Allow invalid types for testing
|
||||
expected: Any, # Allow invalid types for testing
|
||||
) -> None:
|
||||
"""Test readable_unit function with valid inputs."""
|
||||
if isinstance(expected, type) and issubclass(expected, Exception):
|
||||
with pytest.raises(expected):
|
||||
|
||||
Reference in New Issue
Block a user