2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the image 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 image import Image
26
class TestImage(object):
27
""" Tests for the horizontal box widget """
30
""" Initialize test """
32
self.window = Window("Glitter tests")
33
self.window.connect("destroy", self.destroy)
35
self.stage = self.window.get_stage()
36
self.stage.connect('notify::width', self.do_resize)
37
self.stage.connect('notify::height', self.do_resize)
39
self.image = Image("base.py")
40
self.stage.add(self.image)
41
self.image._update_layout()
43
self.window.show_all()
46
def do_resize(self, stage, event):
47
self.image._update_layout()
49
def destroy(self, widget, data=None):
53
if __name__ == '__main__':