You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we decorate one of our tests with the @test decorator, we notice in pytest output several issues:
there is an extra test. For instance pytest output says collected 10 items even though we only have 9 test cases
When looking at verbose pytest output (using the -vv flag) we see this extra test:
this extra test seems to trigger a pytest warning:
================================================================================================================ warnings summary =================================================================================================================
project/integration_tests/test_chain.py::test
/Users/name/Library/Caches/pypoetry/virtualenvs/darwin-ai-langchain-b0bmgt7a-py3.10/lib/python3.10/site-packages/_pytest/python.py:166: PytestReturnNotNoneWarning: Expected None, but project/integration_tests/test_chain.py::test returned <function test.<locals>.decorator at 0x101922b00>, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Suggestion:
Might be due to the decorator name, since pytest collects test function by matching with the test prefix in their names ?
The text was updated successfully, but these errors were encountered:
Issue you'd like to raise.
If we decorate one of our tests with the
@test
decorator, we notice inpytest
output several issues:pytest
output sayscollected 10 items
even though we only have 9 test casesWhen looking at verbose
pytest
output (using the-vv
flag) we see this extra test:pytest
warning:Suggestion:
Might be due to the decorator name, since
pytest
collects test function by matching with thetest
prefix in their names ?The text was updated successfully, but these errors were encountered: