'Like the test of the same name in test_table.py'

def test_constructor_name_arg(self):

    hdu = fits.ImageHDU()
    assert (hdu.name == '')
    assert ('EXTNAME' not in hdu.header)
    hdu.name = 'FOO'
    assert (hdu.name == 'FOO')
    assert (hdu.header['EXTNAME'] == 'FOO')
    hdu = fits.ImageHDU(name='FOO')
    assert (hdu.name == 'FOO')
    assert (hdu.header['EXTNAME'] == 'FOO')
    hdr = fits.Header()
    hdr['EXTNAME'] = 'EVENTS'
    hdu = fits.ImageHDU(header=hdr, name='FOO')
    assert (hdu.name == 'FOO')
    assert (hdu.header['EXTNAME'] == 'FOO')
