test(pyargus): improve test coverage

This commit is contained in:
Anand Balakrishnan 2023-09-07 13:32:27 -07:00
parent 7129177ca0
commit 4942a78899
No known key found for this signature in database
5 changed files with 111 additions and 47 deletions

View file

@ -5,7 +5,7 @@ from typing import List, Optional, Tuple, Type, Union
from argus import _argus
from argus._argus import DType as DType
from argus.exprs import ConstBool, ConstFloat, ConstInt, ConstUInt, VarBool, VarFloat, VarInt, VarUInt
from argus.signals import BoolSignal, FloatSignal, IntSignal, UnsignedIntSignal
from argus.signals import BoolSignal, FloatSignal, IntSignal, Signal, UnsignedIntSignal
try:
__doc__ = _argus.__doc__
@ -96,4 +96,5 @@ __all__ = [
"declare_var",
"literal",
"signal",
"Signal",
]

View file

@ -1,4 +1,4 @@
from typing import ClassVar, Protocol, TypeVar, final
from typing import ClassVar, Generic, Protocol, TypeVar, final
from typing_extensions import Self
@ -136,7 +136,7 @@ class DType:
_SignalKind = TypeVar("_SignalKind", bool, int, float, covariant=True)
class Signal(Protocol[_SignalKind]):
class Signal(Generic[_SignalKind], Protocol):
def is_empty(self) -> bool: ...
@property
def start_time(self) -> float | None: ...