Open perrette opened 1 year ago
@boyanpenkov I think we are now in a better shape to work on the tests (split by thematics, coverage works). In case you wish to work on adding some, don't hesitate to write me in PM, or to say on which tests you want to work first, so that we don't cross PRs. I'll make a break for now. Current status:
Name Stmts Miss Cover Missing
---------------------------------------------------
papers/__init__.py 4 0 100%
papers/__main__.py 526 191 64% 32, 81-89, 105-121, 125-135, 149-151, 154, 173, 179-180, 201-202, 205-206, 221-222, 241, 247-252, 255-262, 273, 308, 320-332, 335-341, 345-349, 358, 362-372, 376, 379, 383-388, 393-498, 501, 812-813, 823, 835, 837, 839, 841, 846-850
papers/_version.py 2 0 100%
papers/bib.py 492 196 60% 45-47, 67, 140-143, 157-158, 175-190, 214, 233-234, 237, 260-264, 273, 332, 371, 381, 388, 401-402, 408, 440-446, 450, 455-459, 469, 505, 513-514, 523, 541, 562-565, 575-580, 590-594, 598-613, 616-629, 633-660, 664-668, 671, 674-682, 686, 692-703, 709-781
papers/config.py 252 82 67% 35, 67-68, 95-99, 106, 111, 117-120, 125, 158-160, 165-166, 172, 175-187, 190-206, 214, 231, 234, 236, 248, 256, 259-264, 301, 308-311, 319-321, 324-328, 335, 346-347, 351-361
papers/duplicate.py 384 136 65% 72-74, 88-89, 95-96, 100-101, 150-157, 163, 174, 176, 178, 195, 200-235, 242, 246, 272, 294, 304, 312, 314-318, 340, 349-371, 401-404, 407, 410, 417, 420, 427, 430-433, 436-451, 477-484, 487, 490, 493, 496-497, 500, 511-525, 538-542, 560-561, 619, 622
papers/encoding.py 84 22 74% 35, 63-64, 106-120, 125-128
papers/extract.py 236 151 36% 32, 51-78, 97, 105, 109, 117-118, 132, 144-159, 179-189, 193-199, 202, 215-221, 226-229, 234-239, 244-245, 250-268, 272, 277-286, 292-332, 337-367, 372-386
papers/filename.py 51 4 92% 18-19, 45-46
papers/latexenc.py 57 36 37% 23-31, 41-90, 100-101
---------------------------------------------------
TOTAL 2088 818 61%
OK, no problem; I'll keep this in mind.
We now have about 60% test coverage (test coverage issues were fixed in #44).
As a first objective, we should aim for 100% test coverage for
__main__.py
, i.e. that every sub-command and if/then/else branching is executed at least once. That way we can be sure that namespace, import and other syntax errors ring the bell. From there, we can start thinking about semantic, i.e. thinking about simple and intricate cases where we expect a meaningful result.The coverage reporting includes a missing lines section that is more informative: