def setup_method(self, method): self.c = Component(["parameter"]) self.c._axes_manager = AxesManager([{"size": 3, "navigate": True}, {"size": 2, "navigate": True}])
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)
def test_invalid_component_name(self): c = self.comp d = c.as_dictionary() n = Component(self.parameter_names) id_dict = n._load_dictionary(d)
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)
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
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