MCPcopy Index your code
hub / github.com/dask/dask / test_globalmethod

Function test_globalmethod

dask/tests/test_context.py:48–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47
48def test_globalmethod():
49 x = Foo()
50
51 assert x.f() == 1
52
53 with dask.config.set(f=lambda: 2):
54 assert x.f() == 2
55
56 with dask.config.set(f=foo):
57 assert x.f is foo
58 assert x.f() == "foo"
59
60 assert x.g is foo
61 assert x.g() == "foo"
62
63 with dask.config.set(g=False):
64 assert x.g is bar
65 assert x.g() == "bar"

Callers

nothing calls this directly

Calls 4

fMethod · 0.95
setMethod · 0.80
gMethod · 0.80
FooClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…