Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] testdir fixture usage seems to cause PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk. #7328

Closed
webknjaz opened this issue Jun 5, 2020 · 1 comment

Comments

@webknjaz
Copy link
Member

webknjaz commented Jun 5, 2020

While implementing pytest-dev/pytest-forked#34, I've faced this, when writing tests for the plugin:

  $PYTHON_PREFIX/lib/python3.8/site-packages/_pytest/compat.py:333: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
  See https://docs.pytest.org/en/latest/deprecations.html#terminalreporter-writer for more information.
    return getattr(object, name, default)

It's funny that the docs even showcase this exact warning in the test report snippet in this section: https://docs.pytest.org/en/stable/writing_plugins.html#testing-plugins.

N.B. I'm currently unable to determine what exactly triggers this because of the dynamic getattr().

@asottile
Copy link
Member

asottile commented Jun 6, 2020

dupe of #6936

@asottile asottile closed this as completed Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants