aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/test_rst_tables.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_rst_tables.py b/tests/test_rst_tables.py
index 0517769..f57761f 100644
--- a/tests/test_rst_tables.py
+++ b/tests/test_rst_tables.py
@@ -29,11 +29,14 @@ class TestRSTTableFormatter(unittest.TestCase):
def setUp(self):
# Default vim cursor for all tests is at line 4
vim.current = mock.Mock()
- vim.current.window.cursor = (4, 0)
+ self.set_vim_cursor(4, 0)
def tearDown(self):
del vim.current
+ def set_vim_cursor(self, row, col):
+ vim.current.window.cursor = (row, col)
+
def read_fixture(self, name):
return open(os.path.join('tests/fixtures/', name + '.txt'),
'r').read().split('\n')
@@ -186,6 +189,5 @@ This is paragraph text *before* the table.
This is paragraph text *after* the table, with
a line ending.
""".split('\n')
- vim.current.window.cursor = (4, 10)
create_table()
self.assertEquals(expect, vim.current.buffer)