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
12869a01
Commit
12869a01
authored
Mar 23, 2015
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New tests for postponing multiple todos
parent
88f609ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
test/PostponeCommandTest.py
test/PostponeCommandTest.py
+47
-0
No files found.
test/PostponeCommandTest.py
View file @
12869a01
...
@@ -164,6 +164,53 @@ class PostponeCommandTest(CommandTest.CommandTest):
...
@@ -164,6 +164,53 @@ class PostponeCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
output
,
"| 1| Foo due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEquals
(
self
.
output
,
"| 1| Foo due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEquals
(
self
.
errors
,
""
)
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_postpone14
(
self
):
command
=
PostponeCommand
([
"1"
,
"2"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
due
=
self
.
today
+
timedelta
(
7
)
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
"| 1| Foo due:{}
\
n
| 2| Bar due:{}
\
n
"
.
format
(
due
.
isoformat
(),
due
.
isoformat
()))
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_postpone15
(
self
):
command
=
PostponeCommand
([
"Foo"
,
"2"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
due
=
self
.
today
+
timedelta
(
7
)
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
"| 1| Foo due:{}
\
n
| 2| Bar due:{}
\
n
"
.
format
(
due
.
isoformat
(),
due
.
isoformat
()))
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_postpone16
(
self
):
command
=
PostponeCommand
([
"-s"
,
"2"
,
"3"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
due
=
self
.
today
+
timedelta
(
7
)
start
=
self
.
start
+
timedelta
(
7
)
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
"| 2| Bar due:{}
\
n
| 3| Baz due:{} t:{}
\
n
"
.
format
(
due
.
isoformat
(),
due
.
isoformat
(),
start
.
isoformat
()))
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_postpone17
(
self
):
command
=
PostponeCommand
([
"1"
,
"2"
,
"3"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertFalse
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
""
)
self
.
assertEquals
(
self
.
errors
,
"Invalid date pattern given.
\
n
"
)
def
test_postpone18
(
self
):
command
=
PostponeCommand
([
"1"
,
"99"
,
"123"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertFalse
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
""
)
self
.
assertEquals
(
self
.
errors
,
"Invalid todo number given: 99.
\
n
Invalid todo number given: 123.
\
n
"
)
def
test_help
(
self
):
def
test_help
(
self
):
command
=
PostponeCommand
([
"help"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
=
PostponeCommand
([
"help"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
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