2014-07-06 01:40:27 +04:00
|
|
|
from helper import unittest, PillowTestCase, tearDownModule
|
2012-10-16 00:26:38 +04:00
|
|
|
|
|
|
|
from PIL import ImageWin
|
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
|
|
|
|
class TestImageWin(PillowTestCase):
|
|
|
|
|
|
|
|
def test_sanity(self):
|
|
|
|
dir(ImageWin)
|
|
|
|
pass
|
|
|
|
|
2014-07-06 01:40:27 +04:00
|
|
|
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)
|
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|
|
|
|
|
|
|
|
# End of file
|