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
2d4fff19
Commit
2d4fff19
authored
Oct 18, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test case and correct for the new results.
parent
aae4efa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
DoCommand.py
DoCommand.py
+3
-3
test/DoCommandTest.py
test/DoCommandTest.py
+1
-1
No files found.
DoCommand.py
View file @
2d4fff19
import
re
import
Command
from
Command
import
*
from
PrettyPrinter
import
*
from
Recurrence
import
advance_recurring_todo
from
TodoList
import
InvalidTodoException
from
Utils
import
convert_todo_number
,
InvalidTodoNumberException
class
DoCommand
(
Command
.
Command
):
class
DoCommand
(
Command
):
def
__init__
(
self
,
p_args
,
p_todolist
,
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
...
...
@@ -18,7 +18,7 @@ class DoCommand(Command.Command):
try
:
self
.
number
=
convert_todo_number
(
self
.
argument
(
0
))
self
.
todo
=
self
.
todolist
.
todo
(
self
.
number
)
except
(
InvalidTodoNumberException
,
InvalidTodoException
):
except
(
Invalid
CommandArgument
,
Invalid
TodoNumberException
,
InvalidTodoException
):
self
.
todo
=
None
def
_complete_children
(
self
):
...
...
test/DoCommandTest.py
View file @
2d4fff19
...
...
@@ -102,7 +102,7 @@ class DoCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
errors
,
"Todo has already been completed.
\
n
"
)
def
test_empty
(
self
):
command
=
DoCommand
.
DoCommand
([
""
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
=
DoCommand
.
DoCommand
([],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertFalse
(
self
.
todolist
.
is_dirty
())
...
...
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