mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Changed test_imagetk to run on Python 3
This commit is contained in:
parent
c013188594
commit
b33b045e9b
|
@ -1,10 +1,13 @@
|
||||||
from helper import unittest, PillowTestCase, hopper
|
from helper import unittest, PillowTestCase, hopper, py3
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import ImageTk
|
from PIL import ImageTk
|
||||||
import Tkinter as tk
|
if py3:
|
||||||
|
import tkinter as tk
|
||||||
|
else:
|
||||||
|
import Tkinter as tk
|
||||||
dir(ImageTk)
|
dir(ImageTk)
|
||||||
HAS_TK = True
|
HAS_TK = True
|
||||||
except (OSError, ImportError) as v:
|
except (OSError, ImportError) as v:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user