'Test different methods for initializing a card that should be
recognized as a RVKC'

def test_initialize_rvkc(self):

    c = fits.Card.fromstring("DP1                    =    'NAXIS:    2'    /    A    comment")
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.0)
    assert (c.field_specifier == 'NAXIS')
    assert (c.comment == 'A    comment')
    c = fits.Card.fromstring("DP1                    =    'NAXIS:    2.1'")
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.1)
    assert (c.field_specifier == 'NAXIS')
    c = fits.Card.fromstring("DP1                    =    'NAXIS:    a'")
    assert (c.keyword == 'DP1')
    assert (c.value == 'NAXIS:    a')
    assert (c.field_specifier is None)
    c = fits.Card('DP1', 'NAXIS:    2')
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.0)
    assert (c.field_specifier == 'NAXIS')
    c = fits.Card('DP1', 'NAXIS:    2.0')
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.0)
    assert (c.field_specifier == 'NAXIS')
    c = fits.Card('DP1', 'NAXIS:    a')
    assert (c.keyword == 'DP1')
    assert (c.value == 'NAXIS:    a')
    assert (c.field_specifier is None)
    c = fits.Card('DP1.NAXIS', 2)
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.0)
    assert (c.field_specifier == 'NAXIS')
    c = fits.Card('DP1.NAXIS', 2.0)
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 2.0)
    assert (c.field_specifier == 'NAXIS')
    with ignore_warnings():
        c = fits.Card('DP1.NAXIS', 'a')
    assert (c.keyword == 'DP1.NAXIS')
    assert (c.value == 'a')
    assert (c.field_specifier is None)
