2
# -*- coding: utf-8 -*-
6
__authors__ = ["Jan Jokela <janjokela@gmail.com>"]
7
__licenses__ = ["LICENSE.LGPL"]
8
__description__ = "Tests for the container widget"
15
# Change sys path to glitter path
16
glitter_path = os.path.split(sys.path[0])[0]
17
sys.path[0] = glitter_path
19
from container import Container
21
class TestContainer(object):
22
""" Tests for the container widget """
25
""" Initialize test """
27
self.stage = clutter.Stage()
28
self.stage.set_size(100, 100)
30
self.container = Container()
31
self.stage.add(self.container)
32
self.container.natural_x = 0.5
33
self.container.natural_width = 0.5
34
self.container.natural_height = 0.5
35
self.container._update_layout()
37
assert self.container.get_x() == 50
38
assert self.container.get_width() == 50
39
assert self.container.get_height() == 50
41
def destroy(self, widget, data=None):
45
if __name__ == '__main__':