Jason R. Coombs
Jason R. Coombs
> Your approach seems to be bottom-up. That sounds about right. My approach is usually first to expose the underlying API as genuinely as possible and then to build abstractions...
Just a note, to use kunal's solution, you need `from _pytest.monkeypatch import MonkeyPatch`: ``` @pytest.fixture(scope="session") def monkeysession(request): from _pytest.monkeypatch import MonkeyPatch mpatch = MonkeyPatch() yield mpatch mpatch.undo() ```
Hmm. They also say "Note that the ability to use a monkeypatch fixture from a session-scoped fixture was added in pytest-3.0." [This comment](https://github.com/pytest-dev/pytest/issues/363#issuecomment-2899072130) indicates that feature was removed. Probably the...
Aah, you were looking at the pytest 3.0.1 docs. The [latest docs](https://docs.pytest.org/en/5.2.0/monkeypatch.html) don't mention that feature.
I'd noticed this issue recently in a number of my projects. I observed the issue most recently in the [cssutils project](/jaraco/cssutils) when [another user's bug report was missing helpful detail](https://github.com/jaraco/skeleton/issues/127)....
Thanks @isra17 for the proof of concept. I do think at the very least we're going to want a regression test to capture expectation that was missed prior to your...
I'd model a test after some of the [existing tests for importlib imports](https://github.com/pytest-dev/pytest/blob/85760bff2776989b365167c7aeb35c86308ab76b/testing/test_pathlib.py#L356-L427). Instead of checking that assert rewrites work, which would be much more involved, figure out what is...
This issue is a dupe of #246.
This issue is a dupe of #246.
Today I learned that although the [shebang hack in distlib](https://github.com/pypa/distlib/blob/674a491e40f17df80fa02a61cb29779f6f2a85b6/distlib/scripts.py#L128-L156) does in fact allow a script with spaces in the interpreter path to be executed by bash: ``` jaraco.vcs main...