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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (hide annotations)
Fri Aug 30 09:44:12 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/test/runtests.py
File MIME type: text/x-python
File size: 992 byte(s)
Initial set of tests and
brief instructions on how to run them

1 bh 292 # Copyright (c) 2002 by Intevation GmbH
2     # Authors:
3     # Bernhard Herzog <[email protected]>
4     #
5     # This program is free software under the GPL (>=v2)
6     # Read the file COPYING coming with Thuban for details.
7    
8     """
9     Main entry point for the Thuban test suite.
10    
11     Just run this file as a python script to execute all tests
12     """
13    
14    
15     import os, sys
16     import unittest
17    
18     import support
19     support.initthuban()
20     import Thuban.Lib.connector
21    
22     def main():
23     """Run all the tests in the Thuban test suite"""
24    
25     Thuban.Lib.connector._the_connector.print_connections()
26    
27     files = os.listdir(os.curdir)
28     names = []
29     for file in files:
30     if file[:4] == "test" and file[-3:] == ".py":
31     names.append(file[:-3])
32    
33     suite = unittest.defaultTestLoader.loadTestsFromNames(names)
34     runner = unittest.TextTestRunner(verbosity = 2)
35     result = runner.run(suite)
36    
37     Thuban.Lib.connector._the_connector.print_connections()
38    
39     sys.exit(not result.wasSuccessful())
40    
41    
42     if __name__ == "__main__":
43     main()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26