相关疑难解决方法(0)

单元,功能,验收和集成测试之间有什么区别?

单元,功能,验收和集成测试(以及我未提及的任何其他类型的测试)之间有什么区别?

testing terminology definition

787
推荐指数
7
解决办法
22万
查看次数

python - 如何测试中断处理程序是否与 pytest 一起工作?

我在类和以下方法中有一个中断处理程序:

def interruptHandler(self, signal, frame):
    """ Catches SIGINT and SIGTERM to allow proper shutdown of all threads etc."""
    self.stopWorker()
    print("interrupt") # the print message is just for me to see if it works
Run Code Online (Sandbox Code Playgroud)

当我按 control + c 时,我从中断处理程序中收到打印消息,因此该方法很好。但是当我为它编写 pytest 时,我不知道如何断言 SIGINT。当我想强制中断时

worker.interruptHandler(signal.sigint)

我收到一个错误,提示我缺少参数框架。

python interrupt pytest

7
推荐指数
0
解决办法
1011
查看次数

标签 统计

definition ×1

interrupt ×1

pytest ×1

python ×1

terminology ×1

testing ×1