Tips about pytest

      No Comments on Tips about pytest

1. Error for “fixture ‘mocker’ not found”
After running pytest, it reported:

The solution is just installing the missing pip package:

2. How to make sure a function has been called without caring about its arguments?
There are two methods. The first method is using “.called”

The second method is using “mocker.spy()”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.