Im trying to write a decorator @performance that will run both functional test and benchmark (using pytest-benchmark ).
i.e.
@performance
def test_single(num):
assert do_work(num)
- should run the test function reporting (pass/fail)
-
should run function as if it were declared:
def test_single_performance(benchmark,num): benchmark(test_single,num)
i tried creating such decorator but failed as benchmark object was not found or some other parameter error
Aucun commentaire:
Enregistrer un commentaire