Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
4875c06a
Commit
4875c06a
authored
Feb 04, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset the configuration in TopydoTest.
Reset the configuration on tearDown, instead of at startup.
parent
9ec16d97
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
14 deletions
+2
-14
test/ListCommandTest.py
test/ListCommandTest.py
+0
-4
test/SortCommandTest.py
test/SortCommandTest.py
+0
-4
test/TodoListTest.py
test/TodoListTest.py
+0
-4
test/TopydoTest.py
test/TopydoTest.py
+2
-2
No files found.
test/ListCommandTest.py
View file @
4875c06a
...
...
@@ -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
()
...
...
test/SortCommandTest.py
View file @
4875c06a
...
...
@@ -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
)
...
...
test/TodoListTest.py
View file @
4875c06a
...
...
@@ -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())
...
...
test/TopydoTest.py
View file @
4875c06a
...
...
@@ -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
(
""
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment