summaryrefslogtreecommitdiff
path: root/plac/doc/test_ishelve.py
blob: a34809d11c51aa58de17ac9282f0d9184ab5b282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# test_ishelve.py
import plac, ishelve

def test():
    assert plac.call(ishelve.main, ['.clear']) == ['cleared the shelve']
    assert plac.call(ishelve.main, ['a=1']) == ['setting a=1']
    assert plac.call(ishelve.main, ['a']) == ['1']
    assert plac.call(ishelve.main, ['.delete=a']) == ['deleted a']
    assert plac.call(ishelve.main, ['a']) == ['a: not found']

if __name__ == '__main__':
    test()