E fixture ‘mocker’ not found - Travis - GitHub
Today, I was trying to run the tests of my GitHub repository using Travis and I got this error:
E fixture ‘mocker’ not found
I had no idea what was happening because I was running the tests locally and everything was fine.
Just in case, if it happens to you locally, you can fix it by installing pytest-mock:
pip install pytest-mock
But in my case, it was happening on Travis. Travis installs the dependencies from the "requirements.txt" file if it is founded, not from other files such as "requirements-dev.txt". It was my case! How do you think I could fix it? Just add to ".travis.yml" the following line:
install
- pip install -r requirements-dev.txt:
Happy testing!