mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
tests: Let silent=None denote we don't care about the output of the command
This commit is contained in:
parent
0391c7fcd4
commit
44d464d158
1 changed files with 8 additions and 7 deletions
|
@ -49,7 +49,7 @@ class IntegrationTest(object):
|
|||
self.add_plugin('taskwiki')
|
||||
self.add_plugin('vimwiki')
|
||||
self.client.edit(os.path.join(self.dir, 'testwiki.txt'))
|
||||
self.command('set filetype=vimwiki', silent=False) # TODO: fix these vimwiki loading errors
|
||||
self.command('set filetype=vimwiki', silent=None) # TODO: fix these vimwiki loading errors
|
||||
|
||||
def teardown(self):
|
||||
self.client.quit()
|
||||
|
@ -63,14 +63,15 @@ class IntegrationTest(object):
|
|||
silent = False
|
||||
|
||||
# For silent commands, there should be no output
|
||||
assert silent == bool(not result)
|
||||
if silent is not None:
|
||||
assert silent == bool(not result)
|
||||
|
||||
# Multiline-evaluate the regex
|
||||
if regex:
|
||||
assert re.search(regex, result, re.MULTILINE)
|
||||
# Multiline-evaluate the regex
|
||||
if regex:
|
||||
assert re.search(regex, result, re.MULTILINE)
|
||||
|
||||
if lines:
|
||||
assert lines == len(result.splitlines())
|
||||
if lines:
|
||||
assert lines == len(result.splitlines())
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue