コード例 #1
0
ファイル: test_glyphs.py プロジェクト: JaakkoTulkki/bokeh
class TestTriangle(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Triangle
        self.test_triangle = Triangle()

    def test_expected_values(self):
        self.assertEqual(self.test_triangle.__view_model__,'triangle')

    def test_to_glyphspec(self):
        self.assertEqual(self.test_triangle.to_glyphspec(), {'line_color': {'value': 'black'}, 'fill_color': {'value': 'gray'}, 'y': {'units': 'data', 'field': 'y'}, 'x': {'units': 'data', 'field': 'x'}, 'type': 'triangle', 'size': {'units': 'screen', 'field': None, 'default': 4}})
コード例 #2
0
class TestTriangle(unittest.TestCase):
    def setUp(self):
        from bokeh.glyphs import Triangle
        self.test_triangle = Triangle()

    def test_expected_values(self):
        self.assertEqual(self.test_triangle.__view_model__, 'triangle')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'triangle'
        self.assertEqual(self.test_triangle.to_glyphspec(), expected)
コード例 #3
0
ファイル: test_glyphs.py プロジェクト: FLOKSociety/bokeh
class TestTriangle(unittest.TestCase):

    def setUp(self):
        from bokeh.glyphs import Triangle
        self.test_triangle = Triangle()

    def test_expected_values(self):
        self.assertEqual(self.test_triangle.__view_model__, 'triangle')

    def test_to_glyphspec(self):
        expected = dict(GENERIC_MARKER_DICT)
        expected['type'] = 'triangle'
        self.assertEqual(self.test_triangle.to_glyphspec(), expected)
コード例 #4
0
def test_Triangle():
    marker = Triangle()
    yield check_marker, marker
    yield check_fill, marker
    yield check_line, marker
    yield check_props, marker, MARKER, FILL, LINE
コード例 #5
0
ファイル: test_glyphs.py プロジェクト: FLOKSociety/bokeh
 def setUp(self):
     from bokeh.glyphs import Triangle
     self.test_triangle = Triangle()
コード例 #6
0
              y="y",
              size="sizes",
              line_color="#7FC97F",
              fill_color=None,
              line_width=2)),
 ("diamond",
  Diamond(x="x", y="y", size="sizes", line_color="#1C9099", line_width=2)),
 ("diamond_cross",
  DiamondCross(x="x",
               y="y",
               size="sizes",
               line_color="#386CB0",
               fill_color=None,
               line_width=2)),
 ("triangle",
  Triangle(x="x", y="y", size="sizes", line_color="#99D594", line_width=2)),
 ("inverted_triangle",
  InvertedTriangle(x="x",
                   y="y",
                   size="sizes",
                   line_color="#DE2D26",
                   line_width=2)),
 ("cross",
  Cross(x="x",
        y="y",
        size="sizes",
        line_color="#E6550D",
        fill_color=None,
        line_width=2)),
 ("asterisk",
  Asterisk(x="x",
コード例 #7
0
 def setUp(self):
     from bokeh.glyphs import Triangle
     self.test_triangle = Triangle()