Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 643

Show
Ignore:
Timestamp:
09/14/05 01:42:12
Author:
fumanchu
Message:

Fix for ticket #300 (better help msg for test suite).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cphttptools.py

    r642 r643  
    423423        applyFilters('beforeErrorResponse') 
    424424        
    425         if isinstance(sys.exc_info()[1], cherrypy.HTTPError): 
    426             # status, body already set by HTTPError constructor 
    427             pass 
    428         else: 
     425        # status, body may already be set by HTTPError constructor 
     426        if not isinstance(exc, cherrypy.HTTPError): 
    429427            # _cpOnError will probably change cherrypy.response.body. 
    430             # They may also change the headerMap, etc. 
     428            # It may also change the headerMap, etc. 
    431429            _cputil.getSpecialAttribute('_cpOnError')() 
    432430         
  • trunk/cherrypy/test/test.py

    r605 r643  
    124124        print """CherryPy Test Program 
    125125    Usage: 
    126         test.py --server --1.1 --cover --basedir=path --profile --test 
     126        test.py --servers* --1.1 --cover --basedir=path --profile --tests** 
     127         
    127128    """ 
    128         print '    servers:' 
     129        print '    * servers:' 
    129130        s = [(val, name) for name, val in self.available_servers.iteritems()] 
    130131        s.sort() 
    131132        for val, name in s: 
    132133            if name == self.default_server: 
    133                 print '        ', name, '(default)' 
     134                print '        --' + name, '(default)' 
    134135            else: 
    135                 print '        ', name 
    136          
    137         print """        all (runs all servers in order) 
    138      
    139     1.1: use HTTP/1.1 servers instead of default HTTP/1.0 
    140      
    141     cover: turn on code-coverage tool 
    142     basedir=path: display coverage stats for some path other than cherrypy. 
    143      
    144     profile: turn on profiling tool 
     136                print '        --' + name 
     137         
     138        print """        --all (runs all servers in order) 
     139     
     140    --1.1: use HTTP/1.1 servers instead of default HTTP/1.0 
     141     
     142    --cover: turn on code-coverage tool 
     143    --basedir=path: display coverage stats for some path other than cherrypy. 
     144     
     145    --profile: turn on profiling tool 
    145146    """ 
    146147         
    147         print '    tests:' 
     148        print '    ** tests:' 
    148149        for name in self.available_tests: 
    149             print '        ', name 
     150            print '        --' + name 
    150151     
    151152    def start_coverage(self): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets