def METHOD_NAME(self):
    """test that a new output format can be created on-the-fly"""
    num = self.map.numoutputformats
    new_format = mapscript.outputFormatObj('GDAL/GTiff', 'gtiffx')
    # assert new_format.refcount == 1, new_format.refcount
    self.map.appendOutputFormat(new_format)
    assert self.map.numoutputformats == num + 1
    # assert new_format.refcount == 2, new_format.refcount
    self.map.selectOutputFormat('gtiffx')
    self.map.save('testAppendNewOutputFormat.map')
    self.map.getLayerByName('INLINE-PIXMAP-RGBA').status = mapscript.MS_ON
    imgobj = self.map.draw()
    filename = 'testAppendNewOutputFormat.tif'
    imgobj.save(filename)