def test_constructor_name_arg(self):

        for hducls in [fits.BinTableHDU, fits.TableHDU]:
            # First test some default assumptions
            hdu = hducls()
            assert hdu.name == ''
            assert 'EXTNAME' not in hdu.header
            hdu.name = 'FOO'
            assert hdu.name == 'FOO'
            assert hdu.header['EXTNAME'] == 'FOO'

            # Passing name to constructor
            hdu = hducls(name='FOO')
            assert hdu.name == 'FOO'
            assert hdu.header['EXTNAME'] == 'FOO'

            # And overriding a header with a different extname
            hdr = fits.Header()
            hdr['EXTNAME'] = 'EVENTS'
            hdu = hducls(header=hdr, name='FOO')
            assert hdu.name == 'FOO'
            assert hdu.header['EXTNAME'] == 'FOO'
#23516 -- This works as a regression test only if the cached loader
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_table.py/TestTableFunctions.test_constructor_name_arg--crossover with--dataset/ETHPy150Open django/django/tests/template_tests/syntax_tests/test_if_changed.py/IfChangedTests.test_include