Exemplo n.º 1
0
def test_Stock_chart():
    tsla = Stock("TSLA")
    # Sometimes these are returned as empty arrays; so don't
    # do much testing for now. Appears to be IEX bug.
    tsla.chart(range='20180514')
    tsla.chart(range='1d', chartReset=True)  # Returns nothing?
    tsla.chart(range='1d', chartReset=False)
    tsla.chart(range='1d', chartSimplify=True)
    tsla.chart(range='1m', chartInterval=10)
Exemplo n.º 2
0
def test_chart_range_error():
    msft = Stock("MSFT")
    with raises(ValueError):
        msft.chart(range="not_a_real_range")