1
# Copyright (c) 2009 Entertainer Developers - See COPYING - GPLv2
6
from entertainerlib.gui.widgets.base import Base
7
from entertainerlib.gui.widgets.label import Label
8
from entertainerlib.gui.widgets.scroll_area import ScrollArea
9
from entertainerlib.tests import EntertainerTest
11
class ScrollAreaTest(EntertainerTest):
12
"""Test for entertainerlib.gui.widgets.scroll_area"""
16
EntertainerTest.setUp(self)
18
# Get a workable amount of text
19
text = "Here is the start. "
20
# pylint: disable-msg=W0612
21
for i in range(0, 100):
22
text += "Here is another sentence. "
24
self.label = Label(0.1, "screentitle", 0.1, 0.2, text)
25
self.scroll_area = ScrollArea(0.5, 0.6, 0.1, 0.1, self.label)
28
"""Clean up after the test"""
29
EntertainerTest.tearDown(self)
32
"""Test correct ScrollArea initialization"""
33
self.assertTrue(isinstance(self.label, (Base, clutter.Label)))
35
def testSetStepSize(self):
36
"""Test correct step size setting"""
37
self.scroll_area.set_step_size(.05)
38
self.assertEqual(self.scroll_area.step_size, 38)