Name: pysnmp
URL: https://github.com/lextudio/pysnmp
Number of lines of code and the tool used to count it: 24961 (lizard pysnmp
)
Programming language: Python
coverage.py
+ pytest-cov
was used for coverage
poetry run pytest --cov=pysnmp --cov-report=xml:coverage.xml
NetworkAddress.clone()
: pysnmp/proto/rfc1155.py
TypeCoercionHackMixIn._verifyComponent()
: pysnmp/proto/rfc1155.py
Bits.prettyIn()
: pysnmp/proto/rfc1902.py
Bits.prettyOut()
: pysnmp/proto/rfc1902.py
Link to commit: 43798f4e
IDs represent lines where the instrumentation was added.
IDs 664 - 675: Bits.prettyIn()
IDs 685 - 694: Bits.prettyOut()
Link to commit: 9a715db6
IDs represent lines where the instrumentation was added from rfc1155.py
.
Both sets of tests are in commit 293cd1aa.
Coverage improvement was from 0% to 100% branch coverage for both functions, as the different tests exercies all tested cases.
Both tests are in commit 9a715db6.
Coverage improvement is from 0% to 85%. One branch is not reached since we couldn't figure out how to trigger that exact scenario, or if it's even possible.
Overall improvement of 66% -> 73% line coverage.
Coverage tool 2 functions instrumented + tested
Repo fork + project setup 2 functions instrumented + tested