# Report for Assignment 1 ## Project chosen Name: Pillow URL of our repository: https://github.com/jovanovicisidora/Pillow-SEP.git URL of the original repo: https://github.com/python-pillow/Pillow.git Number of lines of code and the tool used to count it: - Tool used: coverage.py - Number of lines of code: 82 KLOC Programming language: Python ## Coverage measurement ### Existing tool We used Coverage.py. We executed the coverage tool by running the following command: `python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE` This resulted in the following output: ![Coverage Tool Result](report_images/isidora_images/[BEFORE]overall_coverage.png) ### Your own coverage tool Each member of out group has chosen two functions and has instrumented our own coverage tool. For each function we created a dictionary with the branch ID as key, and a boolean as the value. If the branch was accessed by the tests, the boolean value would be changed from False to True. In order to calculate and display the coverage, all tests use the shared code in **conftest.py**. **1. Deekshu** **2. Duru** **3. Isidora** - Function 1: `_save()` from **SpiderImagePlugin.py** [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/5701d33cbb789342ca781769d4ba7cd323c9255e#diff-44debbfd4d0c5a80130a15bdcd9e0b28c1b4fef6eda0eaaef48838c954589d15) Implemented Coverage Tool - Function 2: `Bitstream.peek()` from **MpegImagePlugin.py** [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-0272f0c6b5871be3364fe2062e50944fba30dad9625c74d13340de7d3ad8d367) Implemented Coverage Tool **4. Sofija** ## Coverage improvement ### Individual tests **1. Deekshu** **2. Duru** **3. Isidora** - Function 1: `_save()` from **SpiderImagePlugin.py** [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-f0eb82b90cfc005f681c774b3bf87f19b1db010750e49f850883005f4f623202) Coverage Before Coverage After - Function 2: `Bitstream.peek()` from **MpegImagePlugin.py** [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-48e5b5451c5cab3fbb758ae58649082b62ae6f2850393a332949643d75bd4ad2) Coverage Before Coverage After **4. Sofija** ### Overall First we provide a screenshot of the old coverage results by running an existing tool: ![Coverage Results Before](report_images/isidora_images/[BEFORE]overall_coverage.png) Here we show the improved overall coverage with all test modifications made by out group: ![Coverage Results After](path/to/image) ## Statement of individual contributions Each group member had an equal contribution to the assignment. We first met together to determine how we can make a coverage tool that can be used across all functions (in conftest.py). Then, each member chose two functions to instrument our coverage tool on and to make/enhance tests for them. The specific functions each member chose can be seen in the report above.