Skip to content

pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020) #7437

@GuillaumeFavelier

Description

@GuillaumeFavelier

Travis fails because of compatibility issues with pytest 5.4.0:

Details
Coverage.py warning: --include is ignored because --source is set (include-ignored)

INTERNALERROR> Traceback (most recent call last):

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/_pytest/main.py", line 187, in wrap_session

INTERNALERROR>     config._do_configure()

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/_pytest/config/__init__.py", line 820, in _do_configure

INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/hooks.py", line 308, in call_historic

INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec

INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>

INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall

INTERNALERROR>     return outcome.get_result()

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result

INTERNALERROR>     raise ex[1].with_traceback(ex[2])

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall

INTERNALERROR>     res = hook_impl.function(*args)

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pytest_sugar.py", line 176, in pytest_configure

INTERNALERROR>     sugar_reporter = SugarTerminalReporter(standard_reporter)

INTERNALERROR>   File "/home/travis/miniconda/lib/python3.7/site-packages/pytest_sugar.py", line 214, in __init__

INTERNALERROR>     self.writer = self._tw

INTERNALERROR> AttributeError: can't set attribute

The command "pytest -m "${CONDITION}" --tb=short --cov=mne ${USE_DIRS}" exited with 3.

image

This happened in #7294 and #7435 and has been reported on pytest-sugar already. Do we have a way to mitigate, maybe downgrade pytest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions