Here are the examples of the python api bokeh.plotting.helpers._get_axis_class taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
7 Examples
3
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_auto(self):
assert(bph._get_axis_class("auto", FactorRange(), 0)) == (CategoricalAxis, {})
assert(bph._get_axis_class("auto", FactorRange(), 1)) == (CategoricalAxis, {})
assert(bph._get_axis_class("auto", DataRange1d(), 0)) == (LinearAxis, {})
assert(bph._get_axis_class("auto", DataRange1d(), 1)) == (LinearAxis, {})
assert(bph._get_axis_class("auto", Range1d(), 0)) == (LinearAxis, {})
assert(bph._get_axis_class("auto", Range1d(), 1)) == (LinearAxis, {})
assert(bph._get_axis_class("auto", Range1d(start=datetime.datetime(2018, 3, 21)), 0)) == (DatetimeAxis, {})
assert(bph._get_axis_class("auto", Range1d(start=datetime.datetime(2018, 3, 21)), 1)) == (DatetimeAxis, {})
@pytest.mark.parametrize('range', _RANGES)
3
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_error(self, range):
with pytest.raises(ValueError):
bph._get_axis_class("junk", range, 0)
with pytest.raises(ValueError):
bph._get_axis_class("junk", range, 1)
def test__get_scale_numeric_range_linear_axis():
0
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_None(self, range):
assert(bph._get_axis_class(None, range, 0)) == (None, {})
assert(bph._get_axis_class(None, range, 1)) == (None, {})
@pytest.mark.parametrize('range', _RANGES)
0
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_linear(self, range):
assert(bph._get_axis_class("linear", range, 0)) == (LinearAxis, {})
assert(bph._get_axis_class("linear", range, 1)) == (LinearAxis, {})
@pytest.mark.parametrize('range', _RANGES)
0
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_log(self, range):
assert(bph._get_axis_class("log", range, 0)) == (LogAxis, {})
assert(bph._get_axis_class("log", range, 1)) == (LogAxis, {})
@pytest.mark.parametrize('range', _RANGES)
0
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_datetime(self, range):
assert(bph._get_axis_class("datetime", range, 0)) == (DatetimeAxis, {})
assert(bph._get_axis_class("datetime", range, 1)) == (DatetimeAxis, {})
@pytest.mark.parametrize('range', _RANGES)
0
Source : test_helpers.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_axis_type_mercator(self, range):
assert(bph._get_axis_class("mercator", range, 0)) == (MercatorAxis, {'dimension': 'lon'})
assert(bph._get_axis_class("mercator", range, 1)) == (MercatorAxis, {'dimension': 'lat'})
def test_axis_type_auto(self):