在命令行上控制个人假设设置(使用 pytest 时)

Control individual hypothesis setting on command line (when using pytest)

我有一个同时使用 pytest 和 hypothesis 的测试套件。我可以在命令行上指定应该使用哪个假设配置文件,就像这样

pytest --hypothesis-profile some_profile

我正在努力寻找如何在不修改现有配置文件或创建新配置文件的情况下影响单个假设设置。我希望能够做一些相当于下面想象的例子

pytest --hypothesis-profile some_profile --hypothesis-setting 'use_coverage=False'

hypothesis/pytest 组合是否提供任何在命令行上修改单个假设设置的方法?

Does the hypothesis / pytest combination provide any means of modifying a single hypothes setting, on the command line?

不,不是。虽然这样做没有什么大的障碍,只是没有人实现它。