У меня есть следующая функция, вызванная из pytest.
def ask_user_input(msg=''):
""" Asks user to check something manually and answer a question """
notification = "\n\n???\tANSWER NEEDED\t???\n\n{}".format(msg)
# suspend input capture by py.test so user input can be recorded here
capture_manager = pytest.config.pluginmanager.getplugin('capturemanager')
capture_manager.suspendcapture(in_=True)
answer = input(notification)
# resume capture after question have been asked
capture_manager.resumecapture()
logging.debug("Answer: {}".format(answer))
return answer
Однако я получаю следующую ошибку: Ошибка: AttributeError: у объекта 'CaptureManager' нет атрибута 'suspendcapture'
Я использую Python 3.6+.Как я могу использовать CaptureManager как pytest.config в приведенном выше примере, кажется, больше не существует.