I am trying to write a test, using pytest, that would check that a specific function is writing out a warning to the log when needed. For example:
In module.py: