Commit 4875c06a authored by Bram Schoenmakers's avatar Bram Schoenmakers

Reset the configuration in TopydoTest.

Reset the configuration on tearDown, instead of at startup.
parent 9ec16d97
......@@ -24,10 +24,6 @@ class ListCommandTest(CommandTest.CommandTest):
super(ListCommandTest, self).setUp()
self.todolist = TestFacilities.load_file_to_todolist("test/data/ListCommandTest.txt")
def tearDown(self):
# restore to the default configuration in case a custom one was set
config("")
def test_list1(self):
command = ListCommand([""], self.todolist, self.out, self.error)
command.execute()
......
......@@ -24,10 +24,6 @@ class SortCommandTest(CommandTest.CommandTest):
super(SortCommandTest, self).setUp()
self.todolist = TestFacilities.load_file_to_todolist("test/data/SorterTest1.txt")
def tearDown(self):
# restore to the default configuration in case a custom one was set
config("")
def test_sort1(self):
""" Alphabetically sorted """
command = SortCommand(["text"], self.todolist, self.out, self.error)
......
......@@ -36,10 +36,6 @@ class TodoListTester(TopydoTest):
self.text = ''.join(lines)
self.todolist = TodoList(lines)
def tearDown(self):
# restore to the default configuration in case a custom one was set
config("")
def test_contexts(self):
self.assertEquals(set(['Context1', 'Context2']), \
self.todolist.contexts())
......
......@@ -19,9 +19,9 @@ import unittest
from topydo.lib.Config import config
class TopydoTest(unittest.TestCase):
def setUp(self):
def tearDown(self):
"""
Make sure that every test case starts with a clean configuration.
Make sure that every test case leaves a clean configuration.
"""
config("")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment