diff --git a/Tests/test_imagetk.py b/Tests/test_imagetk.py index fbf48a1b6..dd0d67d5e 100644 --- a/Tests/test_imagetk.py +++ b/Tests/test_imagetk.py @@ -1,10 +1,13 @@ -from helper import unittest, PillowTestCase, hopper +from helper import unittest, PillowTestCase, hopper, py3 from PIL import Image try: from PIL import ImageTk - import Tkinter as tk + if py3: + import tkinter as tk + else: + import Tkinter as tk dir(ImageTk) HAS_TK = True except (OSError, ImportError) as v: