MCPcopy Create free account
hub / github.com/dagger/dagger / mod

Function mod

sdk/python/tests/mod/test_interfaces.py:20–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19@pytest.fixture
20def 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

Callers

nothing calls this directly

Calls 1

ModuleClass · 0.90

Tested by

no test coverage detected