Python monkeypatch.setattr() with pytest fixture at module scope
Python monkeypatch.setattr() with pytest fixture at module scope Question: First of all, the relevant portion of my project directory looks like: └── my_package ├── my_subpackage │ ├── my_module.py | └── other_module.py └── tests └── my_subpackage └── unit_test.py I am writing some tests in unit_test.py that require mocking of an external resource at the module level. …