示例#1
0
 def setUp(self):
     self.wd = get_webdriver()
     self.port = free_port()
     cmd = [sys.executable, '-m', self.module, '--port', str(self.port)]
     self.proc = subprocess.Popen(cmd, env=os.environ,
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE,
                                  )
     self.url = 'http://localhost:{}'.format(self.port)
     time.sleep(0.5)
     self.wd.get(self.url)
示例#2
0
 def setUpClass(cls):
     cls.wd = get_webdriver()
     if os.environ.get('TRAVIS', True):
         cls.wd.implicitly_wait(10)