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
af2b3cf4
Commit
af2b3cf4
authored
Nov 15, 2015
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new tests to increase lib coverage
parent
34db612b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
test/test_list_command.py
test/test_list_command.py
+14
-0
topydo/lib/MultiCommand.py
topydo/lib/MultiCommand.py
+2
-2
No files found.
test/test_list_command.py
View file @
af2b3cf4
...
@@ -300,6 +300,20 @@ class ListCommandTest(CommandTest):
...
@@ -300,6 +300,20 @@ class ListCommandTest(CommandTest):
self
.
assertEquals
(
self
.
output
,
"|t5c| (C) 2015-11-05 Foo @Context2 Not@Context +Project1 Not+Project
\
n
"
)
self
.
assertEquals
(
self
.
output
,
"|t5c| (C) 2015-11-05 Foo @Context2 Not@Context +Project1 Not+Project
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_list40
(
self
):
command
=
ListCommand
([
"(<C)"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertEquals
(
self
.
output
,
"| 2| (D) Bar @Context1 +Project2
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_list41
(
self
):
command
=
ListCommand
([
"-z"
,
"Zzz"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertEquals
(
self
.
output
,
""
)
self
.
assertEquals
(
self
.
errors
,
"option -z not recognized
\
n
"
)
def
test_help
(
self
):
def
test_help
(
self
):
command
=
ListCommand
([
"help"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
=
ListCommand
([
"help"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
command
.
execute
()
...
...
topydo/lib/MultiCommand.py
View file @
af2b3cf4
...
@@ -106,14 +106,14 @@ class MultiCommand(ExpressionCommand):
...
@@ -106,14 +106,14 @@ class MultiCommand(ExpressionCommand):
Operations specific for particular command dealing with multiple todo
Operations specific for particular command dealing with multiple todo
IDs.
IDs.
"""
"""
pass
raise
NotImplementedError
def
_execute_not_multi
(
self
):
def
_execute_not_multi
(
self
):
"""
"""
Some commands can do something else besides operating on multiple todo
Some commands can do something else besides operating on multiple todo
IDs. This method is a wrapper for those other operations.
IDs. This method is a wrapper for those other operations.
"""
"""
pass
raise
NotImplementedError
def
execute
(
self
):
def
execute
(
self
):
if
not
super
(
MultiCommand
,
self
).
execute
():
if
not
super
(
MultiCommand
,
self
).
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