CleanCut / green

Green is a clean, colorful, fast python test runner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with -r (coverage) output

CleanCut opened this issue · comments

Discussed in #258

Originally posted by Codeberg-AsGithubAlternative-buhtz May 23, 2022
I wonder if I misunderstand the coverage feature or its output. I only want the last four lines (beginning with src/hyperorg) and not the others. The others are all third party dependencies and I don't understand why they are in there.

Name                                                                  Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------------------------------
/usr/lib/python3/dist-packages/pycodestyle.py                          1427    492    66%   64-70, 78-79, 87, 93-94, 176, 183, 192-194, 220, 232, 251-254, 269, 271, 292-309, 320, 325, 339, 346-348, 393, 397, 404, 410-424, 427, 434, 466, 468-469, 486, 488, 491, 493, 510-511, 537-541, 568, 571, 573, 579, 640, 653, 675-676, 682, 684-686, 691, 703-715, 724, 734, 749, 757, 779-784, 814, 834, 836, 839, 841, 890, 893-922, 945-946, 964-968, 1008, 1012, 1026, 1030, 1063, 1069, 1071-1074, 1096, 1123, 1125, 1136, 1140, 1146, 1151, 1202-1206, 1208, 1210, 1215-1219, 1247, 1325-1332, 1366, 1390-1401, 1420-1424, 1445-1448, 1461, 1466, 1527-1528, 1533-1534, 1538-1539, 1542, 1545, 1547, 1563, 1577, 1591, 1603, 1614, 1653-1658, 1690, 1692, 1698-1703, 1705-1712, 1715, 1720-1725, 1729, 1749-1788, 1798-1803, 1813-1816, 1821, 1843-1851, 1878-1896, 1909, 1911, 1916, 1926-1928, 1956, 1970-1971, 1973-1974, 1978-1983, 1987-1990, 1997-2004, 2037-2040, 2080, 2089, 2092, 2095-2101, 2112-2120, 2125, 2134-2135, 2160, 2175, 2188-2192, 2211-2212, 2232, 2236, 2254-2269, 2273, 2277, 2288, 2293-2294, 2298-2301, 2331-2336, 2342-2363, 2371-2372, 2375-2377, 2398, 2410, 2428-2442, 2446-2450, 2454-2472, 2479-2487, 2498, 2573-2575, 2600-2602, 2606-2611, 2614-2616, 2620, 2622-2623, 2626-2652, 2684, 2687, 2690-2694, 2704-2707, 2730-2759, 2763
/usr/lib/python3/dist-packages/unidecode/__init__.py                     63     51    19%   29-30, 33-34, 64-75, 86-87, 92-125, 128-148
/usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py       92     87     5%   2-84, 92-187
/usr/local/lib/python3.9/dist-packages/green/exceptions.py                3      0   100%
/usr/local/lib/python3.9/dist-packages/green/loader.py                  258     96    63%   44, 57-87, 126, 136, 161-162, 181-182, 223-225, 248-249, 258-305, 321-324, 354-355, 363-369, 371, 383-427, 451, 478-480, 488, 494
/usr/local/lib/python3.9/dist-packages/green/output.py                  100     22    78%   27, 44, 50, 57, 68, 74, 77, 84, 87, 90, 93, 96, 149-150, 164, 169, 176-178, 185-186, 198
/usr/local/lib/python3.9/dist-packages/green/process.py                  58     10    83%   47-62
/usr/local/lib/python3.9/dist-packages/green/result.py                  383    159    58%   42-45, 70-71, 75-87, 107, 118, 131, 134-138, 141, 143, 149, 159, 162, 182-183, 191-192, 200-209, 217-226, 343, 349, 355, 361, 367, 377-381, 437, 441, 443, 448-455, 459-460, 462-463, 465-466, 471-472, 474-475, 499-556, 620, 623-625, 642-648, 657-669, 675-679, 685-690, 696-700, 709, 714, 726-728, 733-767, 773-801
/usr/local/lib/python3.9/dist-packages/green/runner.py                   71     21    70%   30-50, 62, 108, 147-149, 152, 159-161
/usr/local/lib/python3.9/dist-packages/green/suite.py                    91     16    82%   49, 60, 64, 186, 197, 241-257
/usr/local/lib/python3.9/dist-packages/green/version.py                   0      0   100%
/usr/local/lib/python3.9/dist-packages/orgparse/__init__.py              22      3    86%   135-137
/usr/local/lib/python3.9/dist-packages/orgparse/date.py                 236     99    58%   10, 16, 87, 144-148, 155, 230, 234, 240, 246-249, 252-263, 266-281, 289-293, 309, 322, 326, 330, 342, 363-373, 376-381, 389-391, 406, 429-431, 439-442, 466-472, 497-507, 572, 588, 604-612, 634-636, 639-642, 646, 661, 673
/usr/local/lib/python3.9/dist-packages/orgparse/extra.py                 81     58    28%   14, 18-29, 32, 36-38, 41-48, 53-61, 69-70, 73-74, 91-116
/usr/local/lib/python3.9/dist-packages/orgparse/inline.py                 4      1    75%   28
/usr/local/lib/python3.9/dist-packages/orgparse/node.py                 478    172    64%   67-69, 91, 93, 113, 137, 169-170, 201-223, 280, 305-311, 352-357, 369, 381, 500, 514-520, 523, 528, 533-543, 549-553, 575, 597, 601-603, 675-680, 687, 691-705, 733, 747-752, 783, 806, 836, 848, 864, 880, 884-891, 900, 906, 910-911, 915, 930, 985, 1012, 1036, 1039, 1044-1045, 1052-1053, 1059-1065, 1079, 1082-1083, 1087, 1090, 1093, 1144-1145, 1177-1178, 1194, 1211-1215, 1248, 1253, 1257, 1292, 1295-1300, 1313, 1331, 1349, 1367, 1385, 1391, 1440, 1446-1447
/usr/local/lib/python3.9/dist-packages/orgparse/utils/__init__.py         0      0   100%
/usr/local/lib/python3.9/dist-packages/orgparse/utils/_py3compat.py       2      1    50%   7
/usr/local/lib/python3.9/dist-packages/orgparse/utils/py3compat.py        9      3    67%   8-9, 14
src/hyperorg/__init__.py                                                 12      0   100%
src/hyperorg/content.py                                                 126      4    97%   141, 269-271
src/hyperorg/exporter.py                                                117      7    94%   38-48
src/hyperorg/reader.py                                                   35      0   100%
---------------------------------------------------------------------------------------------------
TOTAL                                                                  3668   1302    65%

Ran 53 tests in 0.461s using 4 processes

OK (passes=53)

I run green from the projects folder which is in the so called source-layout.

hyperorg
├── docs
├── LICENSE
├── README.md
├── setup.cfg
├── setup.py
├── src
│   └── hyperorg
│       ├── content.py
│       ├── exporter.py
│       ├── __init__.py
│       ├── __main__.py
│       └── reader.py
└── tests
    ├── helper.py
    ├── __init__.py
    ├── test_content.py
    ├── test_exporter.py
    ├── test_hyperorg.py
    └── test_reader.py

Any idea what went wrong on my side?

A fix is in Green 3.4.2 (just released).