Skip to content

Commit

Permalink
fixing ScreenPyHQ#38 - runtime protocol checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Oct 12, 2023
1 parent 6b3062f commit 507227e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions tests/unittest_protocols.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
from typing import Protocol
from typing import Protocol, runtime_checkable

from screenpy import Answerable, ErrorKeeper, Forgettable, Performable
from screenpy import Answerable, Describable, ErrorKeeper, Forgettable, Performable

from screenpy_selenium import Chainable


class Describable(Protocol):
def describe(self) -> str:
...


@runtime_checkable
class Question(Answerable, Describable, Protocol):
...


@runtime_checkable
class ErrorQuestion(Answerable, Describable, ErrorKeeper, Protocol):
...


@runtime_checkable
class Action(Performable, Describable, Protocol):
...


@runtime_checkable
class ChainableAction(Chainable, Performable, Describable, Protocol):
...


@runtime_checkable
class Ability(Forgettable, Protocol):
...

0 comments on commit 507227e

Please sign in to comment.