def test_axis_type_mercator(self, range): assert (_get_axis_class("mercator", range, 0)) == (MercatorAxis, { 'dimension': 'lon' }) assert (_get_axis_class("mercator", range, 1)) == (MercatorAxis, { 'dimension': 'lat' })
def test_axis_type_auto(self): assert(_get_axis_class("auto", FactorRange(), 0)) == (CategoricalAxis, {}) assert(_get_axis_class("auto", FactorRange(), 1)) == (CategoricalAxis, {}) assert(_get_axis_class("auto", DataRange1d(), 0)) == (LinearAxis, {}) assert(_get_axis_class("auto", DataRange1d(), 1)) == (LinearAxis, {}) assert(_get_axis_class("auto", Range1d(), 0)) == (LinearAxis, {}) assert(_get_axis_class("auto", Range1d(), 1)) == (LinearAxis, {}) assert(_get_axis_class("auto", Range1d(start=datetime.datetime(2018, 3, 21)), 0)) == (DatetimeAxis, {}) assert(_get_axis_class("auto", Range1d(start=datetime.datetime(2018, 3, 21)), 1)) == (DatetimeAxis, {})
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, {})
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_axis_type_datetime(self, range): assert (bph._get_axis_class("datetime", range, 0)) == (DatetimeAxis, {}) assert (bph._get_axis_class("datetime", range, 1)) == (DatetimeAxis, {})
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, {})
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, {})
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, {})
def test_axis_type_error(self, range): with pytest.raises(ValueError): _get_axis_class("junk", range, 0) with pytest.raises(ValueError): _get_axis_class("junk", range, 1)
def test_axis_type_mercator(self, range): assert(_get_axis_class("mercator", range, 0)) == (MercatorAxis, {'dimension': 'lon'}) assert(_get_axis_class("mercator", range, 1)) == (MercatorAxis, {'dimension': 'lat'})
def test_axis_type_datetime(self, range): assert(_get_axis_class("datetime", range, 0)) == (DatetimeAxis, {}) assert(_get_axis_class("datetime", range, 1)) == (DatetimeAxis, {})
def test_axis_type_log(self, range): assert(_get_axis_class("log", range, 0)) == (LogAxis, {}) assert(_get_axis_class("log", range, 1)) == (LogAxis, {})
def test_axis_type_linear(self, range): assert(_get_axis_class("linear", range, 0)) == (LinearAxis, {}) assert(_get_axis_class("linear", range, 1)) == (LinearAxis, {})
def test_axis_type_None(self, range): assert(_get_axis_class(None, range, 0)) == (None, {}) assert(_get_axis_class(None, range, 1)) == (None, {})