/[thuban]/branches/WIP-pyshapelib-bramz/test/runtests.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/runtests.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1555 by bh, Thu Aug 7 15:41:05 2003 UTC revision 1838 by bh, Tue Oct 21 09:58:43 2003 UTC
# Line 71  def main(): Line 71  def main():
71      # FIXME: It should be possible to run runtests.py even when not in      # FIXME: It should be possible to run runtests.py even when not in
72      # the test directory      # the test directory
73      files = os.listdir(os.curdir)      files = os.listdir(os.curdir)
74      names = []      if args:
75      for file in files:          names = args
76          if file[:4] == "test" and file[-3:] == ".py":      else:
77              names.append(file[:-3])          names = []
78            for file in files:
79                if file[:4] == "test" and file[-3:] == ".py":
80                    names.append(file[:-3])
81    
82      suite = unittest.defaultTestLoader.loadTestsFromNames(names)      suite = unittest.defaultTestLoader.loadTestsFromNames(names)
83      runner = support.ThubanTestRunner(verbosity = verbosity)      runner = support.ThubanTestRunner(verbosity = verbosity)
84      result = runner.run(suite)      result = support.execute_as_testsuite(runner.run, suite)
   
     support.print_additional_summary()  
85    
86      sys.exit(not result.wasSuccessful())      sys.exit(not result.wasSuccessful())
87    

Legend:
Removed from v.1555  
changed lines
  Added in v.1838

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26