If these is passed, no attributes are removed from the body.
(self)
| 315 | assert (simple_attr("x"),) == attrs |
| 316 | |
| 317 | def test_these_leave_body(self): |
| 318 | """ |
| 319 | If these is passed, no attributes are removed from the body. |
| 320 | """ |
| 321 | |
| 322 | @attr.s(init=False, these={"x": attr.ib()}) |
| 323 | class C: |
| 324 | x = 5 |
| 325 | |
| 326 | assert 5 == C().x |
| 327 | assert "C(x=5)" == repr(C()) |
| 328 | |
| 329 | def test_these_ordered(self): |
| 330 | """ |