Esempio n. 1
0
 def _run(self, conf):
     # helper must be imported lazily so the coverage tool
     # can run against module-level statements within cherrypy.
     # Also, we have to do a relative import here, not
     # "from cherrypy.test import helper", because the latter
     # would stick a second instance of webtest in sys.modules,
     # and we wouldn't be able to globally override the port anymore.
     import helper
     webtest.WebCase.PORT = self.port
     print
     print "Running tests:", self.server
     helper.run_test_suite(self.tests, self.server, conf)
Esempio n. 2
0
 def _run_all_servers(self, conf):
     # helper must be imported lazily so the coverage tool
     # can run against module-level statements within cherrypy.
     # Also, we have to do a relative import here, not
     # "from cherrypy.test import helper", because the latter
     # would stick a second instance of webtest in sys.modules,
     # and we wouldn't be able to globally override the port anymore.
     import helper
     s = [self.available_servers[name] for name in self.servers]
     s.sort()
     webtest.WebCase.PORT = self.PORT
     for priority, name, cls in s:
         print
         print "Running tests:", name
         helper.run_test_suite(self.tests, cls, conf)