Beispiel #1
0
    def test_connection_error(self):
        con = pdblp.BCon(port=1111)

        def try_con():
            con.start()

        self.assertRaises(ConnectionError, try_con)
Beispiel #2
0
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)
Beispiel #3
0
 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/')
Beispiel #4
0
def test_connection_error(port):
    con = pdblp.BCon(port=port + 1)
    with pytest.raises(ConnectionError):
        con.start()
Beispiel #5
0
def test_multi_start(port, host, timeout):
    con = pdblp.BCon(host=host, port=port, timeout=timeout)
    con.start()
    con.start()
Beispiel #6
0
def con(host, port, timeout):
    return pdblp.BCon(host=host, port=port, timeout=timeout).start()
Beispiel #7
0
 def setUp(self):
     self.con = pdblp.BCon(port=IP_PORT, timeout=5000)
     self.con.start()
Beispiel #8
0
 def setUp(self):
     self.con = pdblp.BCon(port=IP_PORT)
     self.con.start()