/[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 1396 by jonathan, Thu Jul 10 14:55:22 2003 UTC revision 1555 by bh, Thu Aug 7 15:41:05 2003 UTC
# Line 15  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15  # $Source$  # $Source$
16  # $Id$  # $Id$
17    
18  import os, sys  import os
19    
20    # It should be possible to run the Thuban testsuite without an X
21    # connection, so we remove the DISPLAY environment variable which should
22    # lead to an error if the wxGTK module is imported accidentally. The
23    # DISPLAY variable is not always set so we catch and ignore the KeyError
24    try:
25        del os.environ["DISPLAY"]
26    except KeyError:
27        pass
28    
29    import sys
30  import warnings  import warnings
31  import unittest  import unittest
32  import getopt  import getopt
# Line 50  def main(): Line 61  def main():
61    
62      opts, args = getopt.getopt(sys.argv[1:], 'v', ['verbose'])      opts, args = getopt.getopt(sys.argv[1:], 'v', ['verbose'])
63      for optchar, value in opts:      for optchar, value in opts:
64          if optchar in ("-v", "--stub-auto-login"):          if optchar in ("-v", "--verbose"):
65              verbosity = 2              verbosity = 2
66          else:          else:
67              print>>sys.stderr, "Unknown option", optchar              print>>sys.stderr, "Unknown option", optchar
# Line 66  def main(): Line 77  def main():
77              names.append(file[:-3])              names.append(file[:-3])
78    
79      suite = unittest.defaultTestLoader.loadTestsFromNames(names)      suite = unittest.defaultTestLoader.loadTestsFromNames(names)
80      runner = unittest.TextTestRunner(verbosity = verbosity)      runner = support.ThubanTestRunner(verbosity = verbosity)
81      result = runner.run(suite)      result = runner.run(suite)
82    
83      support.print_additional_summary()      support.print_additional_summary()

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26