'Tests that setting fits.conf.extension_name_case_sensitive at
runtime works.'

def test_extension_name_case_sensitive(self):

    hdu = fits.ImageHDU()
    hdu.name = 'sCi'
    assert (hdu.name == 'SCI')
    assert (hdu.header['EXTNAME'] == 'SCI')
    with fits.conf.set_temp('extension_name_case_sensitive', True):
        hdu = fits.ImageHDU()
        hdu.name = 'sCi'
        assert (hdu.name == 'sCi')
        assert (hdu.header['EXTNAME'] == 'sCi')
    hdu.name = 'sCi'
    assert (hdu.name == 'SCI')
    assert (hdu.header['EXTNAME'] == 'SCI')
