MCPcopy
hub / github.com/python-attrs/attrs / test_default_decorator_sets

Method test_default_decorator_sets

tests/test_make.py:152–163  ·  view source on GitHub ↗

Decorator wraps the method in a Factory with pass_self=True and sets the default.

(self)

Source from the content-addressed store, hash-verified

150 pass
151
152 def test_default_decorator_sets(self):
153 """
154 Decorator wraps the method in a Factory with pass_self=True and sets
155 the default.
156 """
157 a = attr.ib()
158
159 @a.default
160 def f(self):
161 pass
162
163 assert Factory(f, True) == a._default
164
165
166def make_tc():

Callers

nothing calls this directly

Calls 1

FactoryClass · 0.90

Tested by

no test coverage detected