class TestBaseGlyph(unittest.TestCase): def setUp(self): from bokeh.glyphs import BaseGlyph self.test_glyph = BaseGlyph() def test_expected_properties(self): expected_properties = set(['visible', 'margin', 'halign', 'valign', 'radius_units', 'length_units', 'angle_units', 'start_angle_units', 'end_angle_units']) actual_properties = get_prop_set(type(self.test_glyph)) self.assertTrue(expected_properties.issubset(actual_properties)) def test_expected_values(self): self.assertEqual(self.test_glyph.radius_units, 'screen') self.assertEqual(self.test_glyph.length_units, 'screen') self.assertEqual(self.test_glyph.angle_units, 'deg') self.assertEqual(self.test_glyph.start_angle_units, 'deg') self.assertEqual(self.test_glyph.end_angle_units, 'deg') self.test_glyph.radius_units = 'data' self.test_glyph.length_units = 'data' self.test_glyph.angle_units = 'rad' self.test_glyph.start_angle_units = 'rad' self.test_glyph.end_angle_units = 'rad' def test_to_glyphspec(self): self.assertEqual(self.test_glyph.to_glyphspec(), {'type': 'BaseGlyph'}) self.test_glyph.visible = False self.test_glyph.margin = 5 self.assertEqual(self.test_glyph.to_glyphspec(), {'visible': False, 'margin': 5, 'type': 'BaseGlyph'}) def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), {'visible': True, 'margin': 8, 'type': 'BaseGlyph'})
class TestBaseGlyph(unittest.TestCase): def setUp(self): from bokeh.glyphs import BaseGlyph self.test_glyph = BaseGlyph() def test_expected_properties(self): expected_properties = set( [ "visible", "margin", "halign", "valign", "radius_units", "length_units", "angle_units", "start_angle_units", "end_angle_units", ] ) actual_properties = get_prop_set(type(self.test_glyph)) self.assertTrue(expected_properties.issubset(actual_properties)) def test_expected_values(self): self.assertEqual(self.test_glyph.radius_units, "screen") self.assertEqual(self.test_glyph.length_units, "screen") self.assertEqual(self.test_glyph.angle_units, "deg") self.assertEqual(self.test_glyph.start_angle_units, "deg") self.assertEqual(self.test_glyph.end_angle_units, "deg") self.test_glyph.radius_units = "data" self.test_glyph.length_units = "data" self.test_glyph.angle_units = "rad" self.test_glyph.start_angle_units = "rad" self.test_glyph.end_angle_units = "rad" def test_to_glyphspec(self): self.assertEqual(self.test_glyph.to_glyphspec(), {"type": "BaseGlyph"}) self.test_glyph.visible = False self.test_glyph.margin = 5 self.assertEqual(self.test_glyph.to_glyphspec(), {"visible": False, "margin": 5, "type": "BaseGlyph"}) def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), {"visible": True, "margin": 8, "type": "BaseGlyph"})
def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), { 'visible': True, 'margin': 8, 'type': 'BaseGlyph' })
class TestBaseGlyph(unittest.TestCase): def setUp(self): from bokeh.glyphs import BaseGlyph self.test_glyph = BaseGlyph() def test_expected_properties(self): expected_properties = set([ 'visible', 'margin', 'halign', 'valign', 'radius_units', 'length_units', 'angle_units', 'start_angle_units', 'end_angle_units' ]) actual_properties = get_prop_set(type(self.test_glyph)) self.assertTrue(expected_properties.issubset(actual_properties)) def test_expected_values(self): self.assertEqual(self.test_glyph.radius_units, 'screen') self.assertEqual(self.test_glyph.length_units, 'screen') self.assertEqual(self.test_glyph.angle_units, 'deg') self.assertEqual(self.test_glyph.start_angle_units, 'deg') self.assertEqual(self.test_glyph.end_angle_units, 'deg') self.test_glyph.radius_units = 'data' self.test_glyph.length_units = 'data' self.test_glyph.angle_units = 'rad' self.test_glyph.start_angle_units = 'rad' self.test_glyph.end_angle_units = 'rad' def test_to_glyphspec(self): self.assertEqual(self.test_glyph.to_glyphspec(), {'type': 'BaseGlyph'}) self.test_glyph.visible = False self.test_glyph.margin = 5 self.assertEqual(self.test_glyph.to_glyphspec(), { 'visible': False, 'margin': 5, 'type': 'BaseGlyph' }) def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), { 'visible': True, 'margin': 8, 'type': 'BaseGlyph' })
def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), {'visible': True, 'margin': 8, 'type': 'BaseGlyph'})
def test_constructor(self): from bokeh.glyphs import BaseGlyph test_glyph = BaseGlyph(visible=True, margin=8) self.assertEqual(test_glyph.to_glyphspec(), {"visible": True, "margin": 8, "type": "BaseGlyph"})