コード例 #1
0
def test_ticker_accepts_axis() -> None:
    g = bmg.Grid(axis=LinearAxis())
    assert isinstance(g.axis, LinearAxis)

    g = bmg.Grid()
    g.axis = LinearAxis()
    assert isinstance(g.axis, LinearAxis)
コード例 #2
0
ファイル: test_grids.py プロジェクト: zmj2008/bokeh
def test_ticker_accepts_number_sequences():
    g = bmg.Grid(ticker=[-10, 0, 10, 20.7])
    assert isinstance(g.ticker, FixedTicker)
    assert g.ticker.ticks == [-10, 0, 10, 20.7]

    g = bmg.Grid()
    g.ticker = [-10, 0, 10, 20.7]
    assert isinstance(g.ticker, FixedTicker)
    assert g.ticker.ticks == [-10, 0, 10, 20.7]