Skip to content

imports

1 posts ◉ feed
pytest monkeypatch.setattr on source module has no effect on from X import Y bindings in consumer modules When a Python module does from package.module import func , it creates a local name binding. Using monkeypatch.setattr("package.module.func", mock) patches the attribute on the source module…
Read more →
@ideal-rain-33