summaryrefslogtreecommitdiffstats
path: root/tests/test_gdkevent.py
blob: 9ba0613a9722f0b2519b25e96f1cd94816cc1f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- Mode: Python -*-

import unittest

from common import gtk

class TestGdkEvent(unittest.TestCase):
    def testWindowSetter(self):
        event = gtk.gdk.Event(gtk.gdk.BUTTON_PRESS)

        win1 = gtk.Window()
        win1.realize()
        event.window = win1.window
        self.assertEqual(event.window, win1.window)
        
        win2 = gtk.Window()
        win2.realize()
        event.window = win2.window
        self.assertEqual(event.window, win2.window)

if __name__ == '__main__':
    unittest.main()