/[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 292 by bh, Fri Aug 30 09:44:12 2002 UTC revision 1219 by bh, Mon Jun 16 17:42:54 2003 UTC
# Line 1  Line 1 
1  # Copyright (c) 2002 by Intevation GmbH  # Copyright (c) 2002, 2003 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4  #  #
# Line 13  Just run this file as a python script to Line 13  Just run this file as a python script to
13    
14    
15  import os, sys  import os, sys
16    import warnings
17  import unittest  import unittest
18    
19  import support  import support
# Line 22  import Thuban.Lib.connector Line 23  import Thuban.Lib.connector
23  def main():  def main():
24      """Run all the tests in the Thuban test suite"""      """Run all the tests in the Thuban test suite"""
25    
26      Thuban.Lib.connector._the_connector.print_connections()      # Turn Thuban's deprecation warnings into errors so they're cought
27        # by the tests
28        #
29        # Maintenance: Keep a warning filter until the backwards
30        # compatibility code is removed at which time using the old
31        # interfaces should lead to other errors anyway.
32    
33        # The layer attributes table, shapetable, shapefile and filename are
34        # deprecated.
35        warnings.filterwarnings("error", "The Layer attribute.*is deprecated",
36                                DeprecationWarning)
37    
38        # Usage of the old table interface. This old interface is still used
39        # by the test_table.py module which calls filterwarnings too to
40        # ignore the warnings issued by its own intended use of the old
41        # interface.
42        warnings.filterwarnings("error", ".*old table interface.*",
43                                DeprecationWarning)
44    
45    
46        # All Python files starting with test in the current directory
47        # contain test cases.
48        # FIXME: It should be possible to run runtests.py even when not in
49        # the test directory
50      files = os.listdir(os.curdir)      files = os.listdir(os.curdir)
51      names = []      names = []
52      for file in files:      for file in files:
# Line 34  def main(): Line 57  def main():
57      runner = unittest.TextTestRunner(verbosity = 2)      runner = unittest.TextTestRunner(verbosity = 2)
58      result = runner.run(suite)      result = runner.run(suite)
59    
60      Thuban.Lib.connector._the_connector.print_connections()      support.print_garbage_information()
61    
62      sys.exit(not result.wasSuccessful())      sys.exit(not result.wasSuccessful())
63    

Legend:
Removed from v.292  
changed lines
  Added in v.1219

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26