testit-tms / adapters-python

Apache License 2.0
11 stars 11 forks source link

PytestReturnNotNoneWarning при использовании любого декоратора @testit #53

Open OddanN opened 1 year ago

OddanN commented 1 year ago

`import testit import pytest @pytest.fixture def f_one(): return "1"

@testit.displayName("qw")

@testit.externalId("322")

@testit.labels("sdfsf")

def test_t(f_one): a = f_one print(f"a: {a}") with testit.step("12", "12"): print("Testing") assert a == "1" pass `

При закомментированных декораторах warning'ов нет, при раскомичивании любого декоратора в консоли появляются warning'и:

\lib\site-packages\_pytest\python.py:199 PytestReturnNotNoneWarning('Expected None, but temp.py::test_t returned <function test_t at 0x00000275E1A40EE0>, which will be an error in a future version of pytest. Did you mean to useassertinstead ofreturn?')

TatianaKlimova91 commented 1 year ago

Привет! Передали задачу на изучение нашим разработчикам.