Package: pillow / 8.1.2+dfsg-0.3

generate-webp-file Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/Tests/test_file_webp.py
+++ b/Tests/test_file_webp.py
@@ -12,6 +12,8 @@ from .helper import (
     skip_unless_feature,
 )
 
+import os
+
 try:
     from PIL import _webp
 
@@ -57,7 +59,11 @@ class TestFileWebp:
 
             # generated with:
             # dwebp -ppm ../../Tests/images/hopper.webp -o hopper_webp_bits.ppm
-            assert_image_similar_tofile(image, "Tests/images/hopper_webp_bits.ppm", 1.0)
+            if 'ADTTMP' in os.environ:
+                target_file = os.path.join(os.environ['ADTTMP'], 'hopper_webp.ppm')
+            else:
+                target_file = 'Tests/images/hopper_webp_bits.ppm'
+            assert_image_similar_tofile(image, target_file, 1.0)
 
     def _roundtrip(self, tmp_path, mode, epsilon, args={}):
         temp_file = str(tmp_path / "temp.webp")