diff --git a/README.md b/README.md index a7d7e9f71..cc5cf9601 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,14 @@ the shared code in **conftest.py**. **1. Deekshu** +- Function 1: `buildTransform()` from **ImageCms.py** + + [Link to the commit](https://github.com/python-pillow/Pillow/commit/e31adc7e40442076f65a47b457f0c73040d4e7fc#diff-bd1e1b1de6e5b72a2a01d9d5ea74efe89541f209db5b30c16b975af71e308c67) + +- Function 2: `encode_to_file` from **ImageFile.py** + +[Link to the commit](https://github.com/python-pillow/Pillow/commit/4f31cd7a31a6be2ac38773bab6f0a5451480f5b8#diff-4668a28f508bbcb68e61f9b257415dc814c22e8bb24850629fe7788ae5b7475c) + **2. Duru** **3. Isidora** @@ -96,6 +104,22 @@ the shared code in **conftest.py**. **1. Deekshu** +- Function 1: `buildTransform()` from **ImageCms.py** + + [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/aad549687a1cf9528453eec5e9344192dce388e1) + + Coverage Before + + Coverage After + +- Function 2: `encode_to_file` from **ImageFile.py** + + [Link to the commit]() - how to show the diff patch + + Coverage Before + + Coverage After + **2. Duru** **3. Isidora** @@ -132,5 +156,5 @@ Here we show the improved overall coverage with all test modifications made by o 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. +member chose two functions to instrument our coverage tool on and to make/enhance tests for their branch improvement. The specific functions each member chose can be seen in the report above. diff --git a/Tests/test_imagecms.py b/Tests/test_imagecms.py index 899ec5b01..6b237378d 100644 --- a/Tests/test_imagecms.py +++ b/Tests/test_imagecms.py @@ -698,37 +698,3 @@ def test_deprecation() -> None: assert ImageCms.VERSION == "1.0.0 pil" with pytest.warns(DeprecationWarning): assert isinstance(ImageCms.FLAGS, dict) - -def test_buildTransform_flags_non_integer(): - with pytest.raises(ImageCms.PyCMSError): - ImageCms.buildTransform( - inputProfile="path/to/input/profile", - outputProfile="path/to/output/profile", - inMode="RGB", - outMode="CMYK", - renderingIntent=ImageCms.Intent.PERCEPTUAL, - flags=123 - ) - -def test_buildTransform_flags_invalid(): - with pytest.raises(ImageCms.PyCMSError): - ImageCms.buildTransform( - inputProfile="path/to/input/profile", - outputProfile="path/to/output/profile", - inMode="RGB", - outMode="CMYK", - renderingIntent=ImageCms.Intent.PERCEPTUAL, - flags=999999 - ) - -def test_rendering_intent_non_integer(): - with pytest.raises(ImageCms.PyCMSError) as exc_info: - ImageCms.buildTransform( - inputProfile="path/to/input/profile", - outputProfile="path/to/output/profile", - inMode="RGB", - outMode="CMYK", - renderingIntent="not an integer", - flags=0 - ) - assert str(exc_info.value) == "renderingIntent must be an integer between 0 and 3" diff --git a/report_images/deekshu_images/[AFTER]buildTransform.png b/report_images/deekshu_images/[AFTER]buildTransform.png new file mode 100644 index 000000000..d63b3d0a2 Binary files /dev/null and b/report_images/deekshu_images/[AFTER]buildTransform.png differ diff --git a/report_images/deekshu_images/[AFTER]encode_to_file.png b/report_images/deekshu_images/[AFTER]encode_to_file.png new file mode 100644 index 000000000..d5167e6f9 Binary files /dev/null and b/report_images/deekshu_images/[AFTER]encode_to_file.png differ