lot more test in test_usecase : every command used
This commit is contained in:
parent
04fcb42338
commit
6c9d4a3a41
@ -28,7 +28,9 @@ def _mod_list():
|
|||||||
path=papers.__path__,
|
path=papers.__path__,
|
||||||
prefix=papers.__name__+'.',
|
prefix=papers.__name__+'.',
|
||||||
onerror=lambda x: None):
|
onerror=lambda x: None):
|
||||||
ml.append((modname, __import__(modname, fromlist = 'dummy')))
|
# HACK to not load textnote
|
||||||
|
if not modname.startswith('papers.plugs.texnote'):
|
||||||
|
ml.append((modname, __import__(modname, fromlist = 'dummy')))
|
||||||
return ml
|
return ml
|
||||||
|
|
||||||
mod_list = _mod_list()
|
mod_list = _mod_list()
|
||||||
@ -294,16 +296,20 @@ class TestUsecase(unittest.TestCase):
|
|||||||
|
|
||||||
with self.assertRaises(SystemExit):
|
with self.assertRaises(SystemExit):
|
||||||
cmds = ['papers init',
|
cmds = ['papers init',
|
||||||
('papers add', ['abc', 'n'])
|
('papers add', ['abc', 'n']),
|
||||||
|
('papers add', ['abc', 'y', 'abc', 'n'])
|
||||||
]
|
]
|
||||||
|
|
||||||
_execute_cmds(cmds)
|
_execute_cmds(cmds)
|
||||||
|
|
||||||
# def test_editor_success(self):
|
def test_editor_success(self):
|
||||||
# with real_open('data/', 'r')
|
bibpath = real_os.path.join(real_os.path.dirname(__file__), 'data', 'pagerank.bib')
|
||||||
#
|
with real_open(bibpath, 'r') as f:
|
||||||
# cmds = ['papers init',
|
bibtext = f.read()
|
||||||
# ('papers add', ['abc', 'n'])
|
|
||||||
# ]
|
cmds = ['papers init',
|
||||||
#
|
('papers add', [bibtext]),
|
||||||
# _execute_cmds(cmds)
|
('papers remove Page99', ['y']),
|
||||||
|
]
|
||||||
|
|
||||||
|
_execute_cmds(cmds)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user