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

Function test_core_sync

sdk/python/tests/codegen/test_generator.py:271–286  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

269
270
271def test_core_sync(ctx: Context):
272 # Use the field from the parsed schema so it has the @expectedType AST node.
273 foo_type = _EXPECTED_TYPE_SCHEMA.type_map["Foo"]
274 sync_field = foo_type.fields["sync"]
275 handler = _ObjectField(
276 ctx,
277 "sync",
278 sync_field,
279 foo_type,
280 )
281
282 assert handler.func_signature() == "async def sync(self) -> Self:"
283
284 assert str(handler.func_body()).endswith(
285 'return await self._ctx.execute_sync(self, "sync", _args)'
286 )
287
288
289def test_generate_modern_id_surface():

Callers

nothing calls this directly

Calls 3

_ObjectFieldClass · 0.90
func_signatureMethod · 0.80
func_bodyMethod · 0.80

Tested by

no test coverage detected