def test_update_header_card(self):

        header = fits.Header()
        comment = 'number of bits per data pixel'
        header['BITPIX'] = (16, comment)
        assert 'BITPIX' in header
        assert header['BITPIX'] == 16
        assert header.cards['BITPIX'].comment == comment

        header.set('BITPIX', 32)
        # Make sure the value has been updated, but the comment was preserved
        assert header['BITPIX'] == 32
        assert header.cards['BITPIX'].comment == comment

        # The comment should still be preserved--savecomment only takes effect if
        # a new comment is also specified
        header['BITPIX'] = 16
        assert header.cards['BITPIX'].comment == comment
        header.set('BITPIX', 16, 'foobarbaz', savecomment=True)
        assert header.cards['BITPIX'].comment == comment
Test that the diff is computed correctly.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_core.py/TestCore.test_update_header_card--crossover with--dataset/ETHPy150Open pympler/pympler/test/muppy/test_tracker.py/TrackerTest.test_stracker_diff