我的任务是制作例外屏幕截图。
由于我使用上下文管理器进入会话,因此需要在上下文管理器的 12:52:58,674 WARN [XmlBeanDefinitionReader] Ignored XML validation warning
org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 70; schema_reference.4:
Failed to read schema document 'https://www.springframework.org/schema/tx/spring-tx.xsd',
because 1) could not find
the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
方法之前(在退出会话之前)进行屏幕截图。我为pytest找到的钩子是在__exit__
之后执行的。是否有一些我不知道的钩子是在__exit__
之前的异常中执行的?
我尝试过__exit__
,pytest_runtest_teardown
等。
谢谢