--- a/Tests/test_file_webp.py
+++ b/Tests/test_file_webp.py
@@ -1,6 +1,7 @@
 from helper import unittest, PillowTestCase, hopper
 
 from PIL import Image, WebPImagePlugin
+import os
 
 try:
     from PIL import _webp
@@ -50,8 +51,12 @@ class TestFileWebp(PillowTestCase):
 
         # generated with:
         # dwebp -ppm ../../Tests/images/hopper.webp -o hopper_webp_bits.ppm
+        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'
         self.assert_image_similar_tofile(
-            image, 'Tests/images/hopper_webp_bits.ppm', 1.0)
+            image, target_file, 1.0)
 
     def test_write_rgb(self):
         """
