danielfm / pybreaker

Python implementation of the Circuit Breaker pattern.
BSD 3-Clause "New" or "Revised" License
508 stars 74 forks source link

Replace pytest.fail with TestCase.fail to minimize dependency #50

Closed rickhutcheson closed 4 years ago

rickhutcheson commented 4 years ago

Previously, the tests were importing pytest and using it for a fail call. This causes issues when running the repository from scratch, because setup.py doesn't include a pytest dependency.

The alternative to this approach would be adding the dependency, but since it's only used in one place I assumed you'd rather keep the codebase minimal.

Tested by running python setup.py test in a fresh virtualenv before and after.