Hacker News new | ask | show | jobs
by clarete 4826 days ago
I might be wrong, but I don't think that it's actually possible to mock built-in objects (written in C, not in python) using pytest.

A very quick test would be trying to do something like this:

>>> monkeypatch(str, "blah", "bleh") >>> assert str.blah == "bleh"

I tried it here with no success though.