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

Method test_simple

tests/test_make.py:1354–1365  ·  tests/test_make.py::TestMakeClass.test_simple

Passing a list of strings creates attributes with default args.

(self, ls)

Source from the content-addressed store, hash-verified

1352
1353 @pytest.mark.parametrize(class="st">"ls", [list, tuple])
1354 def test_simple(self, ls):
1355 class="st">"""
1356 Passing a list of strings creates attributes with default args.
1357 class="st">"""
1358 C1 = make_class(class="st">"C1", ls([class="st">"a", class="st">"b"]))
1359
1360 @attr.s
1361 class C2:
1362 a = attr.ib()
1363 b = attr.ib()
1364
1365 assert C1.__attrs_attrs__ == C2.__attrs_attrs__
1366
1367 def test_dict(self):
1368 class="st">"""

Callers

nothing calls this directly

Calls 1

make_classFunction · 0.90

Tested by

no test coverage detected