def METHOD_NAME(self):
    layer = [0]
    key = "foo"
    self.pg.setlayer(key, layer)
    self.assertIs(self.pg.layers[key], layer)
    self.assertRaises(error.Error, self.pg.setlayer, *[key, layer])
    layer = [0]
    self.assertIsNot(self.pg.layers[key], layer)
    self.pg.setlayer(key, layer, True)
    self.assertIs(self.pg.layers[key], layer)