摘要: 读取并返回到目前为止捕获的输出,重置内部缓冲区。 返回 将捕获的内容作为具有out和err 字符串属性的命名元组。 def test_output(capsys): print("hello") captured = capsys.readouterr() assert captured.out = 阅读全文
posted @ 2022-06-17 14:03 zhq9 阅读(31) 评论(0) 推荐(0) 编辑