使用coverage来测试python程序

时间:2017-06-19 05:55:33

标签: python code-coverage coverage.py

我正在使用https://coverage.readthedocs.io/en/coverage-4.4.1/来确定我正在使用的Python程序的数量。

但是,当我使用命令行时:

from

它在class Login_Model extends CI_Model { public function check_user ($where) { $this->db->select('*'); $this->db->from('table_name'); $this->db->where($where); $res=$this->db->get(); return $res->result(); } } 中运行程序,我的程序仅在$coverage myprogram.py 中运行。我无法弄清楚如何使用Python 2进行覆盖。我的命令行也设置为使用Python 3

1 个答案:

答案 0 :(得分:0)

我不得不添加

alias pip='pip3'

然后我必须安装coverage3并且这样做了。

相关问题