summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-04-05 10:17:13 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-04-05 10:17:13 (GMT)
commit50866e9ed3e4e0ebb60c20c3483a8df424c02722 (patch)
tree7a5e6d23b48aaed2a202df3911c3ff0b14f3a8aa /Lib/tkinter/test
parentf66e336f455b5a6bb0ca857d61c43be410d0df13 (diff)
downloadcpython-50866e9ed3e4e0ebb60c20c3483a8df424c02722.zip
cpython-50866e9ed3e4e0ebb60c20c3483a8df424c02722.tar.gz
cpython-50866e9ed3e4e0ebb60c20c3483a8df424c02722.tar.bz2
bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_images.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_images.py b/Lib/tkinter/test/test_tkinter/test_images.py
index 85a8cd0..2805d35 100644
--- a/Lib/tkinter/test/test_tkinter/test_images.py
+++ b/Lib/tkinter/test/test_tkinter/test_images.py
@@ -320,6 +320,15 @@ class PhotoImageTest(AbstractTkTest, unittest.TestCase):
self.assertEqual(image3.get(0, 0), image.get(4, 6))
self.assertEqual(image3.get(1, 2), image.get(5, 8))
+ def test_transparency(self):
+ image = self.create()
+ self.assertEqual(image.transparency_get(0, 0), True)
+ self.assertEqual(image.transparency_get(4, 6), False)
+ image.transparency_set(4, 6, True)
+ self.assertEqual(image.transparency_get(4, 6), True)
+ image.transparency_set(4, 6, False)
+ self.assertEqual(image.transparency_get(4, 6), False)
+
tests_gui = (MiscTest, BitmapImageTest, PhotoImageTest,)