diff --git a/tests/base.py b/tests/base.py index 0c93b64..57b740c 100644 --- a/tests/base.py +++ b/tests/base.py @@ -36,7 +36,6 @@ class IntegrationTest(object): six.text_type(end+1) ).splitlines() - def generate_data(self): self.dir = tempfile.mkdtemp(dir='/tmp/') @@ -106,7 +105,7 @@ class IntegrationTest(object): return self.client.command(py_command + command) else: return self.command(py_command + command, - silent=silent, regex=regex, lines=lines) + silent=silent, regex=regex, lines=lines) def command(self, command, silent=True, regex=None, lines=None): result = self.client.command(command) @@ -182,8 +181,8 @@ class IntegrationTest(object): # Helper function that fills in {uuid} placeholders with correct UUIDs def fill_uuid(self, line): # Tasks in testing can have only alphanumerical descriptions - match = re.match(u'\\s*\\* \\[.\\] (?P[äéôa-zA-Z0-9 \[\]]*)(?[äéôa-zA-Z0-9 \\[\\]]*)(?') - self.client.feedkeys('\') + self.client.feedkeys('\\') + self.client.feedkeys('\\') def fill_uuid(self, line): # Tasks in testing can have only alphanumerical descriptions @@ -318,7 +315,8 @@ class MultipleSourceTest(IntegrationTest): extra_tasks = self.extra_tw.tasks.filter(description=match.group('desc')) if len(tasks) > 1 or len(extra_tasks) > 1: - raise RuntimeError("Description '{0}' matches multiple tasks. " + raise RuntimeError( + "Description '{0}' matches multiple tasks. " "Aborting fill_uuid operation.".format(match.group('desc'))) if tasks: @@ -329,6 +327,7 @@ class MultipleSourceTest(IntegrationTest): else: return line + # Mock vim to test vim-nonrelated functions class MockVim(object): @@ -346,6 +345,7 @@ class MockVim(object): self.vars.clear() self.warriors.clear() + class MockBuffer(object): def __init__(self): @@ -401,4 +401,3 @@ class MockCache(object): self.warriors.clear() self.warriors.update({'default': 'default'}) self.buffer_has_authority = True -