mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-01 11:43:17 +03:00
Test ImageWin. Not much to test, as it's mostly Windows-only.
This commit is contained in:
parent
4b4ed2c9b1
commit
315134eff3
|
@ -1,16 +1,36 @@
|
||||||
from helper import unittest, PillowTestCase, tearDownModule, lena
|
from helper import unittest, PillowTestCase, tearDownModule
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
from PIL import ImageWin
|
from PIL import ImageWin
|
||||||
|
|
||||||
|
|
||||||
class TestImageWin(PillowTestCase):
|
class TestImageWin(PillowTestCase):
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
dir(Image)
|
|
||||||
dir(ImageWin)
|
dir(ImageWin)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def test_hdc(self):
|
||||||
|
# Arrange
|
||||||
|
dc = 50
|
||||||
|
|
||||||
|
# Act
|
||||||
|
hdc = ImageWin.HDC(dc)
|
||||||
|
dc2 = int(hdc)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
self.assertEqual(dc2, 50)
|
||||||
|
|
||||||
|
def test_hwnd(self):
|
||||||
|
# Arrange
|
||||||
|
wnd = 50
|
||||||
|
|
||||||
|
# Act
|
||||||
|
hwnd = ImageWin.HWND(wnd)
|
||||||
|
wnd2 = int(hwnd)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
self.assertEqual(wnd2, 50)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user