def test_to_color_result(self):
     editor = EditorGrafico()
     editor.execute_command("I 5 5")
     editor.execute_command("L 2 2 A")
     color = editor.matrix().get(2, 2)
     self.assertEquals(color, "A")
 def test_to_color_few_argments(self):
     editor = EditorGrafico()
     editor.execute_command("I 5 5")
     editor.execute_command("L 1 1")
     self.assertRaises(UserWarning)
 def test_to_color_wrong_column_value(self):
     editor = EditorGrafico()
     editor.execute_command("I 5 5")
     editor.execute_command("L 1 B C")
     self.assertRaises(ValueError)
 def test_to_color_pixel_empty(self):
     editor = EditorGrafico()
     editor.execute_command("L 1 2 A")
     self.assertRaises(UserWarning)
 def test_clear_zeros_matrix(self):
     editor = EditorGrafico()
     editor.execute_command("I 5 5")
     self.assertRaises(UserWarning)
 def test_create_matrix_user_warning_few_arguments(self):
     editor = EditorGrafico()
     editor.execute_command("I 3")
     self.assertRaises(UserWarning)
 def test_create_matrix(self):
     editor = EditorGrafico()
     editor.execute_command("I 5 5")
     matrix = Matrix(5, 5)
     self.assertEquals(editor.matrix(), matrix)
 def test_set_command_true(self):
     editor = EditorGrafico()
     self.assertTrue(editor.execute_command("I 5 5"))