How to mock in pytest global variable in imported module? #8670
Unanswered
ryohei1540
asked this question in
Q&A
Replies: 1 comment
-
Hi @ryohei1540, It is not clear why this is related to pytest. Seems that creating What happens if you execute |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a module with methods, that I want to test with pytest. In my module I set up global vars such as logger. to use them in various places.
lib/sample.py
tests/sample_test.py
I got this error when I run pytest:
Beta Was this translation helpful? Give feedback.
All reactions