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

def test_invalid_float_cards(self):

    hstr = 'FOCALLEN=    +1.550000000000e+002\nAPERTURE=    +0.000000000000e+000'
    h = fits.Header.fromstring(hstr, sep='\n')
    assert (h['FOCALLEN'] == 155.0)
    assert (h['APERTURE'] == 0.0)
    assert (str(h.cards['FOCALLEN']) == _pad('FOCALLEN=    +1.550000000000E+002'))
    assert h.cards['FOCALLEN']._modified
    assert (str(h.cards['APERTURE']) == _pad('APERTURE=    +0.000000000000E+000'))
    assert h.cards['APERTURE']._modified
    assert h._modified
    h = fits.Header.fromstring(hstr, sep='\n')
    assert (str(h.cards['FOCALLEN']) == _pad('FOCALLEN=    +1.550000000000E+002'))
    assert h.cards['FOCALLEN']._modified
    assert (str(h.cards['APERTURE']) == _pad('APERTURE=    +0.000000000000E+000'))
    assert h.cards['APERTURE']._modified
    assert (h['FOCALLEN'] == 155.0)
    assert (h['APERTURE'] == 0.0)
    assert h._modified
    h['FOCALLEN'] = 155.0
    h['APERTURE'] = 0.0
    assert (str(h.cards['FOCALLEN']) == _pad('FOCALLEN=    +1.550000000000E+002'))
    assert (str(h.cards['APERTURE']) == _pad('APERTURE=    +0.000000000000E+000'))
