def test_connection_error(self): con = pdblp.BCon(port=1111) def try_con(): con.start() self.assertRaises(ConnectionError, try_con)
def test_non_empty_session_queue(port, host): sopts = blpapi.SessionOptions() sopts.setServerHost(host) sopts.setServerPort(port) session = blpapi.Session(sopts) session.start() with pytest.raises(ValueError): pdblp.BCon(session=session)
def setUp(self): self.con = pdblp.BCon(port=IP_PORT, timeout=5000) self.con.start() cdir = os.path.dirname(__file__) self.path = os.path.join(cdir, 'data/')
def test_connection_error(port): con = pdblp.BCon(port=port + 1) with pytest.raises(ConnectionError): con.start()
def test_multi_start(port, host, timeout): con = pdblp.BCon(host=host, port=port, timeout=timeout) con.start() con.start()
def con(host, port, timeout): return pdblp.BCon(host=host, port=port, timeout=timeout).start()
def setUp(self): self.con = pdblp.BCon(port=IP_PORT, timeout=5000) self.con.start()
def setUp(self): self.con = pdblp.BCon(port=IP_PORT) self.con.start()