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

Method TestIgnoreConstructorArg

core/integration/module_python_test.go:2013–2033  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

2011}
2012
2013func (PythonSuite) TestIgnoreConstructorArg(ctx context.Context, t *testctx.T) {
2014 c := connect(ctx, t)
2015
2016 out, err := pythonModInit(t, c, `
2017 from typing import Annotated
2018 import dagger
2019
2020 @dagger.object_type
2021 class Test:
2022 source: Annotated[
2023 dagger.Directory,
2024 dagger.DefaultPath("/"),
2025 dagger.Ignore([".venv"]),
2026 ] = dagger.field()
2027 `).
2028 With(daggerCall("source", "entries", "--json")).
2029 Stdout(ctx)
2030
2031 require.NoError(t, err)
2032 require.Contains(t, gjson.Parse(out).Value(), "dagger.json")
2033}
2034
2035func (PythonSuite) TestErrors(ctx context.Context, t *testctx.T) {
2036 c := connect(ctx, t)

Callers

nothing calls this directly

Calls 8

pythonModInitFunction · 0.85
daggerCallFunction · 0.85
ParseMethod · 0.80
connectFunction · 0.70
ContainsMethod · 0.65
ValueMethod · 0.65
StdoutMethod · 0.45
WithMethod · 0.45

Tested by

no test coverage detected