Beispiel #1
0
 def test_plugin_widget_setattr_invalid(self):
     data = {"a": [1, 2, 3], "b": ["a", "b", "c"]}
     widget = PerspectiveWidget(data)
     with raises(PerspectiveError):
         widget.plugin = "?"
Beispiel #2
0
 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
Beispiel #3
0
 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"