Changeset 1741
- Timestamp:
- 10/08/07 23:57:59
- Files:
-
- trunk/cherrypy/test/helper.py (modified) (1 diff)
- trunk/cherrypy/test/test.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/test/helper.py
r1735 r1741 103 103 104 104 def run_test_suite(moduleNames, server, conf): 105 """Run the given test modules using the given server and conf.105 """Run the given test modules using the given server and [global] conf. 106 106 107 107 The server is started and stopped once, regardless of the number trunk/cherrypy/test/test.py
r1729 r1741 37 37 38 38 def run(self, conf=None): 39 """Run the test harness ."""39 """Run the test harness (using the given [global] conf).""" 40 40 import cherrypy 41 41 v = sys.version.split()[0] … … 50 50 51 51 if isinstance(conf, basestring): 52 conf = cherrypy.config._Parser().dict_from_file(conf) 53 baseconf = {'server.socket_host': self.host, 54 'server.socket_port': self.port, 55 'server.thread_pool': 10, 56 'environment': "test_suite", 57 } 58 baseconf.update(conf or {}) 59 60 baseconf['server.protocol_version'] = self.protocol 52 parser = cherrypy.config._Parser() 53 conf = parser.dict_from_file(conf).get('global', {}) 54 else: 55 conf = conf or {} 56 baseconf = conf.copy() 57 baseconf.update({'server.socket_host': self.host, 58 'server.socket_port': self.port, 59 'server.protocol_version': self.protocol, 60 'environment': "test_suite", 61 }) 61 62 if self.scheme == "https": 62 63 baseconf['server.ssl_certificate'] = serverpem … … 293 294 294 295 def run(self, conf=None): 295 """Run the test harness.""" 296 """Run the test harness (using the given [global] conf).""" 297 conf = conf or {} 298 296 299 # Start the coverage tool before importing cherrypy, 297 300 # so module-level global statements are covered. … … 300 303 301 304 if self.profile: 302 conf = conf or {}303 305 conf['profiling.on'] = True 304 306 305 307 if self.validate: 306 conf = conf or {}307 308 conf['validator.on'] = True 308 309 309 310 if self.conquer: 310 conf = conf or {}311 311 conf['conquer.on'] = True 312 312

