Python coverage 看不到配置文件

Python coverage does not see config file

我正在 运行宁 python 覆盖并行模式下的 Django 单元测试:

coverage run --source='.' --concurrency=multiprocessing manage.py test --parallel

正在抱怨:Options affecting multiprocessing must be specified in a configuration file.

但是我在同一目录中有 .coveragerc 文件,我从该目录开始覆盖以下内容:

[run]
branch = True
concurrency = multiprocessing

试图为覆盖 运行 指定 --rcfile 选项,但没有帮助。我错过了什么?

谢谢!

您不能提供 --concurrency 参数作为命令行参数,只能在配置文件中提供。