()
| 18 | |
| 19 | @pytest.fixture |
| 20 | def mod() -> Module: |
| 21 | m = Module("Pond") |
| 22 | |
| 23 | @m.interface |
| 24 | class Goose(typing.Protocol): |
| 25 | @m.function |
| 26 | def speak(self) -> str: ... |
| 27 | |
| 28 | @m.interface |
| 29 | class Duck(typing.Protocol): |
| 30 | @m.function |
| 31 | def quack(self) -> str: ... |
| 32 | |
| 33 | @m.function |
| 34 | def get_self(self) -> Self: ... |
| 35 | |
| 36 | @m.function |
| 37 | def get_mob(self) -> list[Self]: ... |
| 38 | |
| 39 | def get_private(self) -> bool: ... |
| 40 | |
| 41 | @m.object_type |
| 42 | class Pond: |
| 43 | duck: Duck = dagger.field() |
| 44 | |
| 45 | return m |
| 46 | |
| 47 | |
| 48 | @pytest.fixture |