Update of /cvsroot/happydoc/HappyDoc/misc
In directory usw-pr-cvs1:/tmp/cvs-serv509/misc
Modified Files:
guitest_happydoc.py
Log Message:
Updated to work with new test_happydoc.
Index: guitest_happydoc.py
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc/misc/guitest_happydoc.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** guitest_happydoc.py 24 Oct 2001 21:27:36 -0000 1.1
--- guitest_happydoc.py 8 Jun 2002 17:00:08 -0000 1.2
***************
*** 3,7 ****
# $Id$
#
! # Time-stamp: <01/03/11 12:20:43 dhellmann>
#
# Copyright 2001 Doug Hellmann.
--- 3,7 ----
# $Id$
#
! # Time-stamp: <02/06/08 12:59:49 dhellmann>
#
# Copyright 2001 Doug Hellmann.
***************
*** 38,43 ****
'module_name' : '$RCSfile$',
'rcs_id' : '$Id$',
! 'creator' : 'Doug Hellmann <Dou...@bi...>',
! 'project' : 'UNSPECIFIED',
'created' : 'Sun, 25-Feb-2001 18:01:35 EST',
--- 38,43 ----
'module_name' : '$RCSfile$',
'rcs_id' : '$Id$',
! 'creator' : 'Doug Hellmann <do...@he...>',
! 'project' : 'HappyDoc',
'created' : 'Sun, 25-Feb-2001 18:01:35 EST',
***************
*** 53,69 ****
# Import system modules
#
from Tkinter import *
-
import sys
! sys.path.append('../PmwContribD')
! sys.path.append('../../Python')
!
! import Pmw
#
# Import Local modules
#
! from GuiAppD import GuiAppD
from PipeOutputWindow import PipeOutputWindow
import test_happydoc
--- 53,67 ----
# Import system modules
#
+ import Pmw
from Tkinter import *
import sys
! import unittest
#
# Import Local modules
#
! from PmwContribD.GuiAppD import GuiAppD
from PipeOutputWindow import PipeOutputWindow
+ sys.path.append('.')
import test_happydoc
***************
*** 104,108 ****
def runTest(self, *ignore):
self.busyStart()
! command = './test_happydoc.py -t %s' % self.selected_test.get()
self.component('output').startBackgroundPipe(command,
self.testDone)
--- 102,106 ----
def runTest(self, *ignore):
self.busyStart()
! command = './test_happydoc.py %s 2>&1' % self.selected_test.get()
self.component('output').startBackgroundPipe(command,
self.testDone)
***************
*** 117,127 ****
return
def updateTestList(self):
testchooser = self.component('testchooser')
reload(test_happydoc)
! test_names = map(lambda x: x[0], test_happydoc.test_definitions)
test_names.insert(0, 'all')
testchooser.setlist(test_names)
! default_test = test_happydoc.TestCaseDriver._default_test_case
self.selected_test.set(default_test)
return
--- 115,135 ----
return
+ def getTestNames(self, nameList, testSuite):
+ for test in testSuite._tests:
+ try:
+ nameList.append(test.id())
+ except AttributeError:
+ self.getTestNames(nameList, test)
+ return
+
def updateTestList(self):
testchooser = self.component('testchooser')
reload(test_happydoc)
! test_suite = test_happydoc.getTestSuite()
! test_names = []
! self.getTestNames(test_names, test_suite)
test_names.insert(0, 'all')
testchooser.setlist(test_names)
! default_test = 'all'
self.selected_test.set(default_test)
return
|