I want to test a functions print output. But even though i have imported pytest it doesnt work
import pytest
import io
from time import sleep
import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from decorators import get_time, init_logger
init_logger(True)
@get_time
def test_get_run_time():
sleep(1.5)
capture = capfd.readouterr()
i searched in the internet and could not find anyone with this error