avast / pytest-docker

Docker-based integration tests
MIT License
427 stars 71 forks source link

Tests broken because of calling fixture functions directly #35

Closed butla closed 4 years ago

butla commented 5 years ago

It was causing warnings for some time and it looks like the newer versions of pytest are changing these into errors.

______________________________________ test_docker_services_failure ______________________________________
Fixture "docker_services" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

I have a way of fixing that, but I'm unsure that I should actually fix the tests, or just replace them with ones that don't rely on mocking that heavily. Please check out this PR - #34