Thomas Grainger
Thomas Grainger
Actually the linter should enforce `",".join([str(i) for i in range(3)])` this is faster because join internally converts all generators to lists
See here: https://stackoverflow.com/a/9061024/833093
> One valid reason not to use the `settings` fixture is because it's function scoped. So if you want to override settings in a class/module/session fixture you can't use it....
@erayerdin you can use `@pytest.mark.some_tag_here` instead
looks like a tiny little collect hook to upgrade it to a mark https://github.com/django/django/blob/8bcca47e8356521f52f0738d9633befd53007cae/django/test/utils.py#L844-L853 ```python def pytest_collection_modifyitems(items): for item in items: for tag in getattr(item.obj, "tags", ()): item.add_marker(pytest.mark.django_tag(tag)) ```
eg it would have to replace `.__code__` with something that delegated to a ContextVar that either ran the old code or the patch, then the ContextVar could switch between them
Hmm maybe it would be better to just document how people could do it themselves with existing patchy: ```python import contextlib from concurrent import futures import patchy def sample(): return...
Rather than a fork, energy seems to be coalescing behind https://github.com/nicoddemus/pytest-rich
https://mock.readthedocs.io/en/latest/changelog.html#b1 has AsyncMock
https://github.com/python-trio/trustme/pull/328 sets EKU and KU now