Пример #1
0
 def setup_method(self, method):
     self.c = Component(["parameter"])
     self.c._axes_manager = AxesManager([{"size": 3,
                                          "navigate": True},
                                         {"size": 2,
                                          "navigate": True}])
Пример #2
0
 def test_invalid_parameter_name(self):
     c = self.comp
     d = c.as_dictionary()
     n = Component([a + 's' for a in self.parameter_names])
     n._id_name = 'dummy names yay!'
     id_dict = n._load_dictionary(d)
Пример #3
0
 def test_invalid_component_name(self):
     c = self.comp
     d = c.as_dictionary()
     n = Component(self.parameter_names)
     id_dict = n._load_dictionary(d)
Пример #4
0
 def test_invalid_component_name(self):
     c = self.comp
     d = c.as_dictionary()
     n = Component(self.parameter_names)
     with pytest.raises(ValueError):
         id_dict = n._load_dictionary(d)
Пример #5
0
 def setup_method(self, method):
     self.c = Component(["one", "two"])
     self.c.one.free = False
     self.c.two.free = True
     self.c.one._number_of_elements = 1
     self.c.two._number_of_elements = 2
Пример #6
0
 def setUp(self):
     self.c = Component(["one", "two"])
     self.c.one.free = False
     self.c.two.free = True
     self.c.one._number_of_elements = 1
     self.c.two._number_of_elements = 2