Name: pygame
URL: https://github.com/pygame/pygame
We used lizard in the terminal to count the number of lines of code (NLOC). NLOC: 113408. From these NLOC, ~48992 were in Python as 43% of this project consists of Python.
Programming language: Python
We used the tool Coverage.py. Steps we took to do the test:
- Enter the repository path in terminal.
- Inside the repository directory, we went to path "/test" by using
cd test
. - Execute the coverage tool on the inbuild unit tester with the command:
coverage run .
. - After execution, the command
coverage report
is ran to get the coverage test results which will be shown below.
Group member: Nitesh Shahatoe
Function 1: surfarray_tags.py
Link to instrumentation: https://github.com/pygame/pygame/commit/7ba08bded73317c1e37927489ade6f6a0e2bf23a
<Show a patch (diff) or a link to a commit made in your forked repository that shows the instrumented code to gather coverage measurements>
<Function 2 name>
<Provide the same kind of information provided for Function 1>
Group member: Nitesh Shahatoe
Test surfarray_tags.py
Link to the new/enhanced test: https://github.com/pygame/pygame/commit/9adcfca75f797a6c74a0c9a315b5220d75a9daee
The tests show some overhead tests. In our case, we will skip the package tests and will only look at the surfarray_tags.py. The coverage was previously 58%. The enhanced test has a coverage of 83%. The coverage is improved because I added two advanced tests to test whether or not the imported libraries worked. These newly added tests did not branch out much. There is only a small branch in the second test for the exception handling. This improved the branch coverage significantly.<Test 2>
<Provide the same kind of information provided for Test 1>
<Provide a screenshot of the old coverage results by running an existing tool (the same as you already showed above)>