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

Getting some warnings with pytest 7.0 #78

Closed
varunsh-xilinx opened this issue Mar 7, 2022 · 2 comments
Closed

Getting some warnings with pytest 7.0 #78

varunsh-xilinx opened this issue Mar 7, 2022 · 2 comments

Comments

@varunsh-xilinx
Copy link

After installing the plugin and running the tests, I had the following warnings printed out after the run:

../../../../usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148
../../../../usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148
../../../../usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148
../../../../usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148
../../../../usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148
  /usr/local/lib/python3.6/dist-packages/_pytest/nodes.py:148: PytestDeprecationWarning: <class 'pytest_cpp.plugin.CppFile'> is not using a cooperative constructor and only takes {'parent', 'facade', 'fspath', 'arguments'}.
  See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.
    f"{self} is not using a cooperative constructor and only takes {set(known_kw)}.\n"

../../../../usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98
../../../../usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98
../../../../usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98
../../../../usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98
../../../../usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98
  /usr/local/lib/python3.6/dist-packages/pytest_cpp/plugin.py:98: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to CppFile is deprecated. Please use the (path: pathlib.Path) argument instead.
  See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
    pytest.File.__init__(self, fspath, parent)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

I'm using pytest-cpp 2.1.1 with Python 3.6.9. I've filtered the deprecation warnings out so it's not a huge issue but would be good to fix.

@nicoddemus nicoddemus changed the title Getting some warnings with Python 3.6 Getting some warnings with pytest 7.0 Mar 7, 2022
@nicoddemus
Copy link
Member

Thanks for the report, but this is actually due to pytest 7.0.

We should fix this in pytest-cpp. 👍

@nicoddemus
Copy link
Member

2.1.2 released 🎉

Thanks again for the report. 👍

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