Skip to content

Commit 3df73d2

Browse files
committed
use PIL.__version__ instead of Image.__version__
1 parent 1a734e7 commit 3df73d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import math
1111
import random
1212
import numpy as np
13-
from PIL import Image
13+
from PIL import Image, __version__ as PIL_VERSION
1414
try:
1515
import accimage
1616
except ImportError:
@@ -1264,7 +1264,7 @@ def test_adjust_contrast(self):
12641264
y_ans = np.array(y_ans, dtype=np.uint8).reshape(x_shape)
12651265
self.assertTrue(np.allclose(y_np, y_ans))
12661266

1267-
@unittest.skipIf(Image.__version__ >= '7', "Temporarily disabled")
1267+
@unittest.skipIf(PIL_VERSION >= '7', "Temporarily disabled")
12681268
def test_adjust_saturation(self):
12691269
x_shape = [2, 2, 3]
12701270
x_data = [0, 5, 13, 54, 135, 226, 37, 8, 234, 90, 255, 1]

0 commit comments

Comments
 (0)