mirror of
https://github.com/kennethreitz-archive/plac.git
synced 2026-06-05 15:40:17 +00:00
13 lines
407 B
Python
13 lines
407 B
Python
# 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()
|