'Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/140'

def test_invalid_float_cards2(self, capsys):

    hdu = fits.PrimaryHDU()
    hdu.header['TEST'] = 5.0022221e-07
    hdu.writeto(self.temp('test.fits'))
    with open(self.temp('test.fits'), 'rb+') as f:
        f.seek(346)
        f.write(encode_ascii('e'))
    hdul = fits.open(self.temp('test.fits'))
    with catch_warnings() as w:
        hdul.writeto(self.temp('temp.fits'), output_verify='warn')
    assert (len(w) == 5)
    msg = str(w[3].message)
    assert ("(invalid    value    string:    '5.0022221e-07')" in msg)
