• coverge计算odoo单元测试覆盖率


    具体执行命令: 
    coverage run --source /home/hraddons/litigationguarantee/models odoo-bin -c odoo.conf -d vtest9 --test-enable -u litigationguarantee 
    
    加入--source指定要计算覆盖率的是哪个文件夹下的代码文件
    查看具体报告:
    coverage report -m
    报告示例:

    Name Stmts Miss Cover Missing
    ----------------------------------------------------------------------------------------- hraddons/litigationguarantee/models/__init__.py 8 0 100% hraddons/litigationguarantee/models/lg_attachment.py 158 71 55% 64-65, 110-213, 217, 223-262 hraddons/litigationguarantee/models/lg_case.py 1139 355 69% 231, 235, 281-306, 317-323, 398-403, 408-409, 414-415, 425-426, 512, 517, 523-526, 533, 539, 550-566, 593-594, 601, 605-606, 611-616, 649-693, 711-714, 722-725, 733-736, 744-756, 760, 769-780, 867-868, 870-871, 884-889, 893-894, 898-899, 920-937, 941, 972, 994-995, 1002, 1006-1007, 1065-1076, 1117-1122, 1146, 1157, 1164-1165, 1172, 1176-1177, 1182, 1258, 1284-1285, 1290-1304, 1308-1313, 1317-1322, 1326-1330, 1335-1336, 1340-1341, 1345-1346, 1350, 1376, 1397-1398, 1405, 1409-1410, 1431, 1438, 1459-1461, 1479-1486, 1501, 1539-1548, 1580-1581, 1585-1591, 1595-1598, 1602-1609, 1614-1621, 1626-1633, 1638-1648, 1700-1710, 1723-1738, 1786-1787, 1791-1794, 1799-1801, 1806-1810, 1814-1821, 1826-1833, 1838-1845, 1849-1852 hraddons/litigationguarantee/models/lg_case_analyse.py 177 96 46% 186-203, 208, 213-224, 229-246, 251-262, 267-283, 287-298, 302-313, 317-328, 332-343, 347-358, 362-373, 389-397, 408-413, 424-429 hraddons/litigationguarantee/models/lg_channel_expanse.py 15 0 100% hraddons/litigationguarantee/models/lg_cooperation.py 326 176 46% 74-94, 98-101, 106-107, 111-112, 117-118, 125-127, 132-134, 138-150, 155-163, 167, 171, 208-224, 259-287, 294-344, 366-367, 371-372, 377-379, 384-393, 397-404, 409-421, 426-433, 468-473, 478-479, 487, 491-498, 503-510, 515-522, 527-539, 560-563, 581-584 hraddons/litigationguarantee/models/lg_docx_template.py 14 3 79% 21-23 hraddons/litigationguarantee/models/lg_performance.py 690 361 48% 101-102, 106-128, 133-157, 161-166, 172-202, 206-209, 216-225, 230-238, 243, 248-251, 256-284, 289-317, 321-326, 330-342, 347-362, 366, 378-393, 398-414, 419-426, 431-451, 560-566, 576-580, 585-588, 596, 599, 601, 605, 609, 614-617, 622-626, 639-653, 657-666, 671-704, 718-725, 786, 822-826, 854, 873, 878-880, 889-890, 900, 929, 936-938, 941-948, 953-955, 965, 972-977, 993, 1003-1006, 1034-1039, 1055-1062, 1112, 1125-1143, 1163-1173 hraddons/litigationguarantee/models/lg_project_relieve.py 81 44 46% 61-79, 85-92, 96-104, 109-116, 120-123 ----------------------------------------------------------------------------------------- TOTAL 2608 1106 58%
  • 相关阅读:
    CS224n笔记2 词的向量表示:word2vec
    志在必得的。。。。失败。。。
    大二第二个学期帮学姐做的毕设
    本地系统密码破解
    ubuntu12.04装有线网卡驱动(AR8162)
    数据结构递归与非递归走迷宫
    vs6.0项目升迁到vs2012中宏映射问题
    文件太大,对于目标文件系统.文件过大 无法复制问题
    第39级台阶
    linux编程
  • 原文地址:https://www.cnblogs.com/yiduobaozhiblog1/p/16426442.html
Copyright © 2020-2023  润新知