Skip to content

Commit

Permalink
topotato: break layers for type checks
Browse files Browse the repository at this point in the history
These shouldn't be there in a cleanly layered world, but for the sake of
good type checks add them for now.  Better long-term solution would be
to use pytest's `Stash`.

Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Sep 17, 2024
1 parent acce7b8 commit 682934e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions topotato/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

from .toponom import Network
from .timeline import Timeline
from .pretty import PrettyItem

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -179,6 +180,8 @@ class TopotatoItem(nodes.Item):
to pytest to do its thing.
"""

pretty: "PrettyItem"

_codeloc: Optional[inspect.FrameInfo]
"""
Test source code location that resulted in the creation of this item.
Expand Down
3 changes: 3 additions & 0 deletions topotato/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from . import toponom
from .types import ISession
from .frr.core import FRRSetup
from .pretty import PrettyInstance


_logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -57,6 +58,8 @@ class TestSetup(TopotatoNetwork, topo=topology):
timeline: Timeline
session: "ISession"
nodeid: str
pretty: "PrettyInstance"
reports: List[Any]

_network: ClassVar["toponom.Network"]

Expand Down

0 comments on commit 682934e

Please sign in to comment.