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)
def get_quotes_robinhood(*args, **kwargs): return RobinhoodQuoteReader(*args, **kwargs).read()
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)