コード例 #1
0
ファイル: test_plugin.py プロジェクト: zwgirl/perspective
 def test_plugin_widget_setattr_invalid(self):
     data = {"a": [1, 2, 3], "b": ["a", "b", "c"]}
     widget = PerspectiveWidget(data)
     with raises(PerspectiveError):
         widget.plugin = "?"
コード例 #2
0
ファイル: test_plugin.py プロジェクト: zwgirl/perspective
 def test_plugin_widget_set_all(self):
     data = {"a": [1, 2, 3], "b": ["a", "b", "c"]}
     widget = PerspectiveWidget(data)
     for plugin in Plugin:
         widget.plugin = plugin
         assert widget.plugin == plugin.value
コード例 #3
0
ファイル: test_plugin.py プロジェクト: zwgirl/perspective
 def test_plugin_widget_setattr(self):
     data = {"a": [1, 2, 3], "b": ["a", "b", "c"]}
     widget = PerspectiveWidget(data)
     widget.plugin = Plugin.XBAR
     assert widget.plugin == "x_bar"