Teemu / pytest-sugar

a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly)
Other
1.32k stars 74 forks source link

pytest ignores pytest-sugar when launch with coverage #261

Closed 12rambau closed 1 year ago

12rambau commented 1 year ago

I am using coverage to run pytest and it seems that it prevents the pytest-sugar plugin to start. Is there a way to force it ?

Command used to run pytest

coverage run -m pytest --color=yes tests

Output

The results of my CD/CI is still using vanilla pytest: https://github.com/12rambau/sepal_ui/actions/runs/3542697512/jobs/5948468920

12rambau commented 1 year ago

I found a solution in your tests: https://github.com/Teemu/pytest-sugar/blob/461104cd6e6081e5050bb6e6c70c9a0561c3dbf6/test_sugar.py#L39

So now I run:

coverage run -m pytest --color=yes --force-sugar tests

Which works as expected ! Sorry for the noise