os.system使用lcov --remove,但subprocess.call不是

问题描述

我正在使用lcov,我想从覆盖率报告中排除一些文件/目录。

当我使用os.system()时:

os.system("lcov --remove  build/unit_test_coverage.info \'*test*\' \'*mock*\' -o build/unit_test_coverage.info")

它排除了我所期望的文件/目录。

但是当我像这样使用subprocess.call()时:

subprocess.call(["lcov","--remove","build/unit_test_coverage.info","\'*test*\'","\'*mock*\'","-o","build/unit_test_coverage.info"])

不排除文件/目录。

有人知道为什么吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)