Exemple #1
0
def test_key_pop():
    """Can pop an unknown"""

    from sherpa.astro.io.meta import Meta
    store = Meta()
    store['key1'] = True
    store['key2'] = False

    assert store.pop('key') is None
    assert store.keys() == ['key1', 'key2']
Exemple #2
0
def test_key_pop():
    """Can pop a known value"""

    from sherpa.astro.io.meta import Meta
    store = Meta()
    store['key1'] = True
    store['key2'] = False

    assert store.pop('key1')
    assert store.keys() == ['key2']