[POS-commit] r5365 - kiwi/trunk/kiwi/ui/test
Johan Dahlin
jdahlin at async.com.br
Tue Nov 21 14:58:35 BRST 2006
Author: jdahlin
Date: Tue Nov 21 14:58:35 2006
New Revision: 5365
Modified:
kiwi/trunk/kiwi/ui/test/recorder.py
Log:
Make the recorder write a better header
Modified: kiwi/trunk/kiwi/ui/test/recorder.py
==============================================================================
--- kiwi/trunk/kiwi/ui/test/recorder.py (original)
+++ kiwi/trunk/kiwi/ui/test/recorder.py Tue Nov 21 14:58:35 2006
@@ -38,7 +38,6 @@
import sys
import time
-import gobject
from gtk import gdk
import gtk
@@ -48,9 +47,11 @@
try:
from gobject import add_emission_hook
+ add_emission_hook # pyflakes
except ImportError:
try:
from kiwi._kiwi import add_emission_hook
+ add_emission_hook # pyflakes
except ImportError:
add_emission_hook = None
@@ -369,6 +370,7 @@
self._events = []
self._listened_objects = []
self._event_types = self._configure_event_types()
+ self._args = None
# This is sort of a hack, but there are no other realiable ways
# of actually having something executed after the application
@@ -384,6 +386,7 @@
def execute(self, args):
self._start_timestamp = time.time()
+ self._args = args
# Run the script
sys.argv = args
@@ -478,6 +481,8 @@
fd = open(self._filename, 'w')
except IOError:
raise SystemExit("Could not write: %s" % self._filename)
+ fd.write("... -*- Mode: doctest -*-\n")
+ fd.write("run: %s\n" % ' '.join(self._args))
fd.write(">>> from kiwi.ui.test.runner import runner\n")
fd.write(">>> runner.start()\n")
More information about the POS-commit
mailing list