How can I get my Python script to work correctly with both normal execution and pytest

welcome to shbcf.ru