'Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/145
Ensure that a validation error occurs when saving an HDUList containing
multiple PrimaryHDUs.'

def test_create_from_multiple_primary(self):

    hdul = fits.HDUList([fits.PrimaryHDU(), fits.PrimaryHDU()])
    pytest.raises(VerifyError, hdul.writeto, self.temp('temp.fits'), output_verify='exception')
