Raises ValueError if passed Factory has takes_self=True.
(self)
| 187 | default_if_none(True, lambda: 42) |
| 188 | |
| 189 | def test_factory_takes_self(self): |
| 190 | """ |
| 191 | Raises ValueError if passed Factory has takes_self=True. |
| 192 | """ |
| 193 | with pytest.raises(ValueError, match="takes_self"): |
| 194 | default_if_none(Factory(list, takes_self=True)) |
| 195 | |
| 196 | @pytest.mark.parametrize("val", [1, 0, True, False, "foo", "", object()]) |
| 197 | def test_not_none(self, val): |
nothing calls this directly
no test coverage detected