Skip to content

Commit

Permalink
add test for inheritance command override
Browse files Browse the repository at this point in the history
  • Loading branch information
eonu committed Dec 8, 2023
1 parent 94f693f commit fefa4dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/test_core/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,18 @@ def h(*, arg: int) -> int:
}


def test_inheritance_overwrite_command() -> None:
class Parent(feud.Group):
def f(*, arg: str = "From the parent!") -> int:
return arg

class Child(Parent):
def f(*, arg: str = "From the child!") -> str:
return arg

assert Child.f([], standalone_mode=False) == "From the child!"


def test_register_deregister_compile() -> None:
class Parent(
feud.Group,
Expand Down

0 comments on commit fefa4dc

Please sign in to comment.