Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Increase test coverage #661

Merged
merged 4 commits into from
Apr 6, 2022
Merged

DEV: Increase test coverage #661

merged 4 commits into from
Apr 6, 2022

Conversation

MartinThoma
Copy link
Member

No description provided.

@MartinThoma
Copy link
Member Author

Name                  Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------
PyPDF2/__init__.py        5      0      0      0   100%
PyPDF2/_version.py        1      0      0      0   100%
PyPDF2/filters.py       302    238    140      9    21%   42, 54-108, 116-119, 123-162, 167, 173-189, 199-207, 210-211, 214-231, 238-265, 269, 274-345, 355, 360-385, 393->396, 398->424, 403, 405, 407, 410-418
PyPDF2/generic.py       725    327    325     50    52%   83-91, 110, 115, 125-128, 134-138, 144-148, 154, 185, 194, 197, 205, 214, 217, 222, 231-232, 246, 249, 260-261, 264, 267, 301, 312, 320, 322, 334, 336, 339->393, 379, 381-392, 410-415, 432->exit, 440-445, 451-466, 474, 481, 487-494, 505, 507, 511-515, 529-537, 544->exit, 547-553, 559, 564, 566-568, 571, 584-589, 599, 603-604, 610-612, 625-634, 648, 651, 654, 657-665, 668-690, 693-758, 761-774, 783-791, 797, 806-820, 828, 851, 866-868, 871-873, 879, 882, 885, 888, 891, 894, 897, 900, 903, 906, 909, 912, 915, 918, 921, 924, 927, 930, 960-967, 969->exit, 974->exit, 979->exit, 984->exit, 989->exit, 994->exit, 1001->exit, 1007->exit, 1013->exit, 1018->exit, 1048-1067, 1070, 1073-1087, 1089->exit, 1096->exit, 1103->exit, 1110->exit, 1117->exit, 1124->exit, 1131->exit, 1138->exit, 1148-1161, 1165-1172
PyPDF2/merger.py        288    254    157      1     9%   36-37, 50-53, 71-77, 104-181, 203, 212-233, 240-246, 256, 273, 289, 296-305, 312-329, 332-345, 349-419, 422-436, 439-460, 463-474, 485-505, 515-516, 521-524, 527-529, 532-548, 551-553
PyPDF2/pagerange.py      49     25     24      5    48%   64-65, 68-69, 73, 76-78, 84->87, 90, 97, 120, 134-152
PyPDF2/pdf.py          1596    951    736     82    36%   52, 57, 70, 73, 119, 149, 186-188, 205-212, 266-324, 365-369, 380, 395-396, 411-443, 452-528, 537-540, 543-600, 603-606, 609-620, 623-655, 658-669, 672-694, 711-755, 758-763, 766-778, 784-788, 797-843, 852-897, 917-955, 983-1025, 1037-1040, 1057-1061, 1078-1081, 1097-1101, 1126->1137, 1130-1135, 1143, 1163-1168, 1170->exit, 1183-1187, 1189->exit, 1213-1214, 1218->1220, 1222->exit, 1243->exit, 1265-1293, 1296-1308, 1311-1314, 1317-1338, 1344-1345, 1358-1389, 1391->exit, 1403-1441, 1445-1457, 1468-1470, 1482-1484, 1487-1489, 1492-1514, 1516->exit, 1533-1536, 1551-1554, 1573->1576, 1582->1584, 1585->exit, 1621, 1624-1629, 1632-1642, 1645-1646, 1666-1669, 1672, 1674->1676, 1682, 1693-1696, 1705, 1730, 1737->1739, 1744-1746, 1756, 1761, 1769-1774, 1778, 1792, 1799-1801, 1821-1822, 1831, 1842, 1852, 1859->1858, 1862, 1880, 1891-1892, 1919->1905, 1928->1905, 1932-1933, 1941, 1948-1966, 1969-1982, 1985, 1992->1989, 2002, 2006, 2012-2013, 2016-2017, 2019, 2069, 2075, 2086-2087, 2099, 2100->2106, 2120-2132, 2136-2138, 2142, 2146->exit, 2188-2204, 2214-2216, 2225-2227, 2230-2232, 2235-2246, 2250-2258, 2265-2268, 2274-2279, 2289-2292, 2305, 2312-2379, 2393, 2408, 2423-2424, 2441, 2459-2472, 2488-2497, 2516-2524, 2542-2555, 2571-2576, 2586-2608, 2617, 2627-2631, 2641-2645, 2660->2665, 2667-2670, 2672, 2674-2677, 2679-2682, 2740, 2758-2760, 2770-2771, 2778-2821, 2824-2840, 2843, 2864, 2867-2870, 2872->exit, 2876->exit, 2879->exit, 2883->exit, 2886->exit, 2890->exit, 2893->exit, 2899->exit, 2902->exit, 2908->exit, 2914, 2951, 2959->2966, 2973-2994, 3009->3016, 3025-3032
PyPDF2/utils.py         175     58     76      8    64%   59, 64, 69-70, 85, 116-117, 131-134, 146-147, 150, 153-165, 186, 195-202, 226-227, 246, 253, 263, 269-272, 277, 283-288, 292, 299-309
PyPDF2/xmp.py           207    207     78      0     0%   1-352
-----------------------------------------------------------------
TOTAL                  3348   2060   1536    155    35%

@MartinThoma MartinThoma merged commit 1cde559 into master Apr 6, 2022
@MartinThoma MartinThoma deleted the test-coverage branch April 6, 2022 05:52
MartinThoma added a commit that referenced this pull request Apr 7, 2022
Features:

 - Add alpha channel support for png files in Script (#614)

Bug fixes (BUG):

 - Fix formatWarning for filename without slash (#612)
 - Add whitespace between words for extractText() (#569, #334)
 - "invalid escape sequence" SyntaxError (#522)
 - Avoid error when printing warning in pythonw (#486)
 - Stream operations can be List or Dict (#665)

Documentation (DOC):

 - Added Scripts/pdf-image-extractor.py
 - Documentation improvements (#550, #538, #324, #426, #394)

Tests and Test setup (TST):

 - Add Github Action which automatically run unit tests via pytest and
   static code analysis with Flake8 (#660)
 - Add several unit tests (#661, #663)
 - Add .coveragerc to create coverage reports

Developer Experience Improvements (DEV):

 - Pre commit: Developers can now `pre-commit install` to avoid tiny issues
               like trailing whitespaces

Miscallenious:

 - Add the LICENSE file to the distributed packages (#288)
 - Use setuptools instead of distutils (#599)
 - Improvements for the PyPI page (#644)
 - Python 3 changes (#504, #366)

You can see the full changelog at: 1.26.0...1.27.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant