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
de08a68d
Commit
de08a68d
authored
Nov 12, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tearDown function that always restores the configuration.
parent
69ae311d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
test/ListCommandTest.py
test/ListCommandTest.py
+4
-5
No files found.
test/ListCommandTest.py
View file @
de08a68d
...
...
@@ -23,6 +23,10 @@ class ListCommandTest(CommandTest.CommandTest):
def
setUp
(
self
):
self
.
todolist
=
TestFacilities
.
load_file_to_todolist
(
"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
.
ListCommand
([
""
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -105,9 +109,6 @@ class ListCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
output
,
" 1 (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
# restore
config
(
""
)
def
test_list12
(
self
):
config
(
"data/listcommand.conf"
)
...
...
@@ -118,8 +119,6 @@ class ListCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
output
,
" 1 (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
3 (C) Baz @Context1 +Project1 key:value id:1
\
n
2 (D) Bar @Context1 +Project2 p:1
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
config
(
""
)
def
test_list13
(
self
):
command
=
ListCommand
.
ListCommand
([
"-x"
,
"--"
,
"-@Context1 +Project2"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
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