Skip to content

Commit

Permalink
fixing #36 & #38 (#37)
Browse files Browse the repository at this point in the history
* fixing #36
* fixing #38 - runtime protocol checks
* removing test protocol that isn't used and causes issues with isinstance against ErrorKeeper
  • Loading branch information
bandophahita authored Oct 12, 2023
1 parent a912b21 commit d5cac93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 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.

2 changes: 1 addition & 1 deletion tests/test__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


def test_metadata() -> None:
assert __version__.__title__ == "screenpy-selenium"
assert __version__.__title__ == "screenpy_selenium"
assert __version__.__license__ == "MIT"
assert __version__.__author__ == "Perry Goy"
17 changes: 6 additions & 11 deletions tests/unittest_protocols.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
from typing import Protocol
from typing import Protocol, runtime_checkable

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

from screenpy_selenium import Chainable


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


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


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 d5cac93

Please sign in to comment.