Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEduardo Silva <edsiper@monotop.(none)>2007-05-08 13:33:58 (GMT)
committer Eduardo Silva <edsiper@monotop.(none)>2007-05-08 13:33:58 (GMT)
commit6a685d38b4712a7efc031787780df4df171f1a46 (patch)
treef726720ac028cda71be2a8486d6e68f30e926759 /tests
parent9180388a76e9de7742a9337a03458b98eb15747c (diff)
parent60d6dcd6188695add3c7b620c2a3eb61092fcf0a (diff)
Merge branch 'master' of git://dev.laptop.org/sugar
Diffstat (limited to 'tests')
-rwxr-xr-x[-rw-r--r--]tests/test-notebook.py0
-rwxr-xr-xtests/test-snowflake-box.py29
2 files changed, 9 insertions, 20 deletions
diff --git a/tests/test-notebook.py b/tests/test-notebook.py
index fe90de8..fe90de8 100644..100755
--- a/tests/test-notebook.py
+++ b/tests/test-notebook.py
diff --git a/tests/test-snowflake-box.py b/tests/test-snowflake-box.py
index 4164af4..45f3c0a 100755
--- a/tests/test-snowflake-box.py
+++ b/tests/test-snowflake-box.py
@@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import sys
-import random
+from random import random
import pygtk
pygtk.require('2.0')
@@ -33,14 +33,14 @@ from sugar.graphics.canvasicon import CanvasIcon
def _create_snowflake(parent, children):
color = XoColor()
- icon = CanvasIcon(scale=1.0, xo_color=color,
+ icon = CanvasIcon(scale=0.8, xo_color=color,
icon_name='theme:object-link')
parent.append(icon, hippo.PACK_FIXED)
parent.set_root(icon)
for i in range(0, children):
color = XoColor()
- icon = CanvasIcon(scale=0.5, xo_color=color,
+ icon = CanvasIcon(scale=0.4, xo_color=color,
icon_name='theme:stock-buddy')
parent.append(icon, hippo.PACK_FIXED)
@@ -55,24 +55,13 @@ root_box = SpreadBox(background_color=0xe2e2e2ff)
canvas.set_root(root_box)
box = SnowflakeBox()
-snow_flake = _create_snowflake(box, 30)
-root_box.add_item(box)
+snow_flake = _create_snowflake(box, 0)
+root_box.set_center_item(box)
-box = SnowflakeBox()
-snow_flake = _create_snowflake(box, 15)
-root_box.add_item(box)
-
-box = SnowflakeBox()
-snow_flake = _create_snowflake(box, 10)
-root_box.add_item(box)
-
-box = SnowflakeBox()
-snow_flake = _create_snowflake(box, 5)
-root_box.add_item(box)
-
-box = SnowflakeBox()
-snow_flake = _create_snowflake(box, 2)
-root_box.add_item(box)
+for i in range(0, 30):
+ box = SnowflakeBox()
+ snow_flake = _create_snowflake(box, int(2 + random() * 8))
+ root_box.add_item(box)
canvas.show()
window.add(canvas)