2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the frame widget"
19
# Change sys path to glitter path
20
glitter_path = os.path.split(sys.path[0])[0]
21
sys.path[0] = glitter_path
23
from window import Window
24
from frame import Frame
25
from image import Image
27
class TestButton(object):
28
""" Tests for the frame widget, depends on Image widget """
31
""" Initialize test """
33
self.window = Window("Glitter tests")
34
self.window.connect("destroy", self.destroy)
36
self.stage = self.window.get_stage()
37
self.stage.connect('notify::width', self.do_resize)
38
self.stage.connect('notify::height', self.do_resize)
41
self.stage.add(self.frame)
43
self.image = Image("base.py")
44
self.frame.add(self.image)
46
self.window.show_all()
49
def destroy(self, widget, data=None):
52
def do_resize(self, stage, event):
53
self.frame._update_layout()
55
if __name__ == '__main__':