Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sugar/shell.py9
-rw-r--r--tests/sugar/tree.py9
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/sugar/shell.py b/tests/sugar/shell.py
index ef2e4af..515f98e 100644
--- a/tests/sugar/shell.py
+++ b/tests/sugar/shell.py
@@ -1,3 +1,4 @@
+import logging
import sys
import time
@@ -25,7 +26,7 @@ def build_activities_list():
def launch_and_stop_activity(activity_name):
- print "Launching %s" % activity_name
+ logging.info("Launching %s" % activity_name)
root = tree.get_root()
shell = root.find_child(name="sugar-session", role_name="application")
@@ -40,7 +41,7 @@ def launch_and_stop_activity(activity_name):
if name == activity_name:
icon.click()
- print "Stopping %s" % activity_name
+ logging.info("Stopping %s" % activity_name)
if activity_name in ACTIVITIES_WITH_OBJECT_CHOOSER:
close_button = shell.find_child(name="Close",
@@ -73,6 +74,10 @@ def go_to_list_view():
def main():
+ format = "%(created)f %(message)s"
+ logging.basicConfig(format=format)
+ logging.root.setLevel(logging.DEBUG)
+
go_to_list_view()
for activity in build_activities_list():
diff --git a/tests/sugar/tree.py b/tests/sugar/tree.py
index 1438acc..6a12abc 100644
--- a/tests/sugar/tree.py
+++ b/tests/sugar/tree.py
@@ -1,3 +1,4 @@
+import logging
import time
from gi.repository import Atspi
@@ -15,10 +16,10 @@ def _retry_find(func):
n_retries = 1
while n_retries <= 10:
- print "Try %d, name=%s role_name=%s" % \
- (n_retries,
- kwargs.get("name", None),
- kwargs.get("role_name", None))
+ logging.info("Try %d, name=%s role_name=%s" %
+ (n_retries,
+ kwargs.get("name", None),
+ kwargs.get("role_name", None)))
result = func(*args, **kwargs)
expect_none = kwargs.get("expect_none", False)