Esempio n. 1
0
def test_path_format_keys():
    t1 = QueryResponseTable({'Start Time': ['2011/01/01', '2011/01/02'],
                             '!excite!': ['cat', 'rabbit'],
                             '01 wibble': ['parsnip', 'door']})
    assert t1.path_format_keys() == {'start_time', '_excite_', '01_wibble'}

    t2 = QueryResponseTable({'End Time': ['2011/01/01', '2011/01/02'],
                             '!excite!': ['cat', 'rabbit']})
    assert t2.path_format_keys() == {'_excite_', 'end_time'}
    unif = UnifiedResponse(t1, t2)
    assert unif.path_format_keys() == {'_excite_'}
Esempio n. 2
0
def test_path_format_keys():
    t1 = QueryResponseTable({'Start Time': ['2011/01/01', '2011/01/02'],
                             '!excite!': ['cat', 'rabbit'],
                             '01 wibble': ['parsnip', 'door']})
    assert t1.path_format_keys() == {'start_time', '_excite_', '01_wibble'}

    t2 = QueryResponseTable({'End Time': ['2011/01/01', '2011/01/02'],
                             '!excite!': ['cat', 'rabbit']})
    assert t2.path_format_keys() == {'_excite_', 'end_time'}

    unif = UnifiedResponse(t1, t2)
    assert unif.path_format_keys() == {'_excite_'}

    with pytest.warns(SunpyDeprecationWarning):
        assert unif.response_block_properties() == {'_excite_'}