bokeh.core.query.EQ

Here are the examples of the python api bokeh.core.query.EQ taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

0 View Source File : test_query.py
License : MIT License
Project Creator : rthorst

def test_ops():
    res = list(
        q.find(plot.references(), {'size': {q.EQ: 5}})
    )
    assert len(res) == 1

    res = list(
        q.find(plot.references(), {'size': {q.NEQ: 5}})
    )
    assert len(res) == 0

    res = list(
        q.find(plot.references(), {'size': {q.GEQ: 5}})
    )
    assert len(res) == 1

    res = list(
        q.find(plot.references(), {'size': {q.LEQ: 5}})
    )
    assert len(res) == 1

    res = list(
        q.find(plot.references(), {'size': {q.GT: 5}})
    )
    assert len(res) == 0

    res = list(
        q.find(plot.references(), {'size': {q.LT: 5}})
    )
    assert len(res) == 0

def test_malformed_exception():

0 View Source File : test_query.py
License : MIT License
Project Creator : rthorst

def test_malformed_exception():
    with pytest.raises(ValueError):
        q.match(plot, {11: {q.EQ: 5}})

def test_with_context():