예제 #1
0
def test_robinhood_quote_too_many():
    syms = np.random.randint(65, 90, size=(10000, 4)).tolist()
    syms = list(map(lambda r: ''.join(map(chr, r)), syms))
    syms = list(set(syms))
    with pytest.raises(ValueError):
        RobinhoodQuoteReader(symbols=syms)
예제 #2
0
def get_quotes_robinhood(*args, **kwargs):
    return RobinhoodQuoteReader(*args, **kwargs).read()
예제 #3
0
def test_robinhood_quote(symbols):
    df = RobinhoodQuoteReader(symbols=symbols).read()
    assert isinstance(df, pd.DataFrame)
    if isinstance(symbols, str):
        symbols = [symbols]
    assert df.shape[1] == len(symbols)