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
842ff3ad
Commit
842ff3ad
authored
Sep 27, 2015
by
MinchinWeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add leading zero the the name of select testcases, so they still sort alphabetically
parent
7af6e77f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
57 deletions
+57
-57
test/AddCommandTest.py
test/AddCommandTest.py
+9
-9
test/FilterTest.py
test/FilterTest.py
+7
-7
test/ListCommandTest.py
test/ListCommandTest.py
+8
-8
test/PostponeCommandTest.py
test/PostponeCommandTest.py
+9
-9
test/SorterTest.py
test/SorterTest.py
+10
-10
test/TagCommandTest.py
test/TagCommandTest.py
+14
-14
No files found.
test/AddCommandTest.py
View file @
842ff3ad
...
...
@@ -87,7 +87,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
1
).
source
(),
"(C) "
+
self
.
today
+
" Foo"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep1
(
self
):
def
test_add_dep
0
1
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -98,7 +98,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
2
).
source
(),
self
.
today
+
" Bar p:1"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep2
(
self
):
def
test_add_dep
0
2
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -109,7 +109,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
2
).
source
(),
self
.
today
+
" Bar p:1"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep3
(
self
):
def
test_add_dep
0
3
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
)
command
.
execute
()
...
...
@@ -120,7 +120,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
2
).
source
(),
self
.
today
+
" Bar id:1"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_de
p
4
(
self
):
def
test_add_de
0
4
(
self
):
""" Test for using an after: tag with non-existing value. """
command
=
AddCommand
.
AddCommand
([
"Foo after:1"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -130,7 +130,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| "
+
self
.
todolist
.
todo
(
1
).
source
()
+
"
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep5
(
self
):
def
test_add_dep
0
5
(
self
):
""" Test for using an after: tag with non-existing value. """
command
=
AddCommand
.
AddCommand
([
"Foo after:2"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -140,7 +140,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| "
+
self
.
todolist
.
todo
(
1
).
source
()
+
"
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep6
(
self
):
def
test_add_dep
0
6
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -155,7 +155,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
3
).
source
(),
self
.
today
+
" Baz p:1 p:2"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep7
(
self
):
def
test_add_dep
0
7
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -170,7 +170,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
3
).
source
(),
self
.
today
+
" Baz id:1"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_add_dep8
(
self
):
def
test_add_dep
0
8
(
self
):
config
(
"test/data/todolist-uid.conf"
)
command
=
AddCommand
.
AddCommand
([
"Foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
...
...
@@ -182,7 +182,7 @@ class AddCommandTest(CommandTest):
self
.
assertEqual
(
self
.
todolist
.
todo
(
'7ui'
).
source
(),
"{} Foo p:1"
.
format
(
self
.
today
))
self
.
assertEqual
(
self
.
todolist
.
todo
(
'8to'
).
source
(),
"{} Bar id:1"
.
format
(
self
.
today
))
def
test_add_dep9
(
self
):
def
test_add_dep
0
9
(
self
):
"""
The text ID shown after adding and after an 'ls' must be equal."
By appending the parent's projects, the textual ID may change.
...
...
test/FilterTest.py
View file @
842ff3ad
...
...
@@ -25,14 +25,14 @@ from topydo.lib.Todo import Todo
from
test.TopydoTest
import
TopydoTest
class
FilterTest
(
TopydoTest
):
def
test_filter3
(
self
):
def
test_filter
0
3
(
self
):
todo
=
Todo
(
"(C) Relevant"
)
relevance
=
Filter
.
RelevanceFilter
()
result
=
relevance
.
filter
([
todo
])
self
.
assertEqual
(
result
,
[
todo
])
def
test_filter4
(
self
):
def
test_filter
0
4
(
self
):
""" Test case insensitive match. """
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
grep
=
Filter
.
GrepFilter
(
'+project'
)
...
...
@@ -43,7 +43,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
filtered_todos
),
\
todolist_to_string
(
reference
))
def
test_filter5
(
self
):
def
test_filter
0
5
(
self
):
""" Test case sensitive match. """
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
grep
=
Filter
.
GrepFilter
(
'+Project'
)
...
...
@@ -54,7 +54,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
filtered_todos
),
\
todolist_to_string
(
reference
))
def
test_filter6
(
self
):
def
test_filter
0
6
(
self
):
""" Test case sensitive match (forced, with lowercase). """
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
grep
=
Filter
.
GrepFilter
(
'+project'
,
True
)
...
...
@@ -65,7 +65,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
filtered_todos
),
\
todolist_to_string
(
reference
))
def
test_filter7
(
self
):
def
test_filter
0
7
(
self
):
""" Tests the dependency filter. """
todolist
=
load_file_to_todolist
(
'test/data/FilterTest2.txt'
)
depfilter
=
Filter
.
DependencyFilter
(
todolist
)
...
...
@@ -76,7 +76,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
filtered_todos
),
\
todolist_to_string
(
reference
))
def
test_filter8
(
self
):
def
test_filter
0
8
(
self
):
""" Test case sensitive match (forced, with lowercase). """
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
grep
=
Filter
.
GrepFilter
(
'+Project'
,
False
)
...
...
@@ -87,7 +87,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
filtered_todos
),
\
todolist_to_string
(
reference
))
def
test_filter9
(
self
):
def
test_filter
0
9
(
self
):
""" Test instance filter """
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
instance_filter
=
Filter
.
InstanceFilter
(
todos
[
2
:])
...
...
test/ListCommandTest.py
View file @
842ff3ad
...
...
@@ -29,7 +29,7 @@ class ListCommandTest(CommandTest):
super
(
ListCommandTest
,
self
).
setUp
()
self
.
todolist
=
load_file_to_todolist
(
"test/data/ListCommandTest.txt"
)
def
test_list1
(
self
):
def
test_list
0
1
(
self
):
command
=
ListCommand
([
""
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -37,7 +37,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
| 4| (C) Drink beer @ home
\
n
| 5| (C) 13 + 29 = 42
\
n
| 2| (D) Bar @Context1 +Project2
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list3
(
self
):
def
test_list
0
3
(
self
):
command
=
ListCommand
([
"Context1"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -45,7 +45,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 2| (D) Bar @Context1 +Project2
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list4
(
self
):
def
test_list
0
4
(
self
):
command
=
ListCommand
([
"-x"
,
"Context1"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -53,7 +53,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 3| (C) Baz @Context1 +Project1 key:value
\
n
| 2| (D) Bar @Context1 +Project2
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list5
(
self
):
def
test_list
0
5
(
self
):
command
=
ListCommand
([
"-x"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -61,7 +61,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
| 3| (C) Baz @Context1 +Project1 key:value
\
n
| 4| (C) Drink beer @ home
\
n
| 5| (C) 13 + 29 = 42
\
n
| 2| (D) Bar @Context1 +Project2
\
n
| 6| x 2014-12-12 Completed but with date:2014-12-12
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list6
(
self
):
def
test_list
0
6
(
self
):
command
=
ListCommand
([
"Project3"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -69,7 +69,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
""
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list7
(
self
):
def
test_list
0
7
(
self
):
command
=
ListCommand
([
"-s"
,
"text"
,
"-x"
,
"Project1"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -77,7 +77,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 3| (C) Baz @Context1 +Project1 key:value
\
n
| 1| (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list8
(
self
):
def
test_list
0
8
(
self
):
command
=
ListCommand
([
"--"
,
"-project1"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -85,7 +85,7 @@ class ListCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 4| (C) Drink beer @ home
\
n
| 5| (C) 13 + 29 = 42
\
n
| 2| (D) Bar @Context1 +Project2
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_list9
(
self
):
def
test_list
0
9
(
self
):
command
=
ListCommand
([
"--"
,
"-project1"
,
"-Drink"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/PostponeCommandTest.py
View file @
842ff3ad
...
...
@@ -42,7 +42,7 @@ class PostponeCommandTest(CommandTest):
self
.
todolist
=
TodoList
(
todos
)
def
test_postpone1
(
self
):
def
test_postpone
0
1
(
self
):
command
=
PostponeCommand
([
"1"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -52,7 +52,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| Foo due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone2
(
self
):
def
test_postpone
0
2
(
self
):
command
=
PostponeCommand
([
"2"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -62,7 +62,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 2| Bar due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone3
(
self
):
def
test_postpone
0
3
(
self
):
command
=
PostponeCommand
([
"-s"
,
"2"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -72,7 +72,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 2| Bar due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone4
(
self
):
def
test_postpone
0
4
(
self
):
command
=
PostponeCommand
([
"3"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -82,7 +82,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 3| Baz due:{} t:{}
\
n
"
.
format
(
due
.
isoformat
(),
self
.
start
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone5
(
self
):
def
test_postpone
0
5
(
self
):
command
=
PostponeCommand
([
"-s"
,
"3"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -94,7 +94,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 3| Baz due:{} t:{}
\
n
"
.
format
(
due
.
isoformat
(),
start
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone6
(
self
):
def
test_postpone
0
6
(
self
):
command
=
PostponeCommand
([
"4"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -104,7 +104,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 4| Past due:{}
\
n
"
.
format
(
due
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone7
(
self
):
def
test_postpone
0
7
(
self
):
command
=
PostponeCommand
([
"5"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -115,7 +115,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 5| Future due:{} t:{}
\
n
"
.
format
(
due
.
isoformat
(),
self
.
future_start
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone8
(
self
):
def
test_postpone
0
8
(
self
):
command
=
PostponeCommand
([
"-s"
,
"5"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -127,7 +127,7 @@ class PostponeCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 5| Future due:{} t:{}
\
n
"
.
format
(
due
.
isoformat
(),
start
.
isoformat
()))
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_postpone9
(
self
):
def
test_postpone
0
9
(
self
):
command
=
PostponeCommand
([
"1"
,
"foo"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/SorterTest.py
View file @
842ff3ad
...
...
@@ -36,26 +36,26 @@ class SorterTest(TopydoTest):
self
.
assertEqual
(
todos_sorted
,
todos_ref
)
self
.
assertEqual
(
todolist_to_string
(
todos
),
text_before
)
def
test_sort1
(
self
):
def
test_sort
0
1
(
self
):
""" Alphabetically sorted """
sorter
=
Sorter
(
'text'
)
self
.
sort_file
(
'test/data/SorterTest1.txt'
,
'test/data/SorterTest1-result.txt'
,
sorter
)
def
test_sort2a
(
self
):
def
test_sort
0
2a
(
self
):
"""
Ascendingly sorted by priority. Also checks stableness of the sort.
"""
sorter
=
Sorter
(
'prio'
)
self
.
sort_file
(
'test/data/SorterTest2.txt'
,
'test/data/SorterTest2-result.txt'
,
sorter
)
def
test_sort2b
(
self
):
def
test_sort
0
2b
(
self
):
"""
Ascendingly sorted by priority. Also checks stableness of the sort.
"""
sorter
=
Sorter
(
'asc:prio'
)
self
.
sort_file
(
'test/data/SorterTest2.txt'
,
'test/data/SorterTest2-result.txt'
,
sorter
)
def
test_sort3
(
self
):
def
test_sort
0
3
(
self
):
"""
Descendingly sorted by priority. Also checks stableness of the
sort.
...
...
@@ -63,32 +63,32 @@ class SorterTest(TopydoTest):
sorter
=
Sorter
(
'desc:prio'
)
self
.
sort_file
(
'test/data/SorterTest3.txt'
,
'test/data/SorterTest3-result.txt'
,
sorter
)
def
test_sort4
(
self
):
def
test_sort
0
4
(
self
):
""" Ascendingly sorted by due date """
sorter
=
Sorter
(
config
().
tag_due
())
self
.
sort_file
(
'test/data/SorterTest4.txt'
,
'test/data/SorterTest4-result.txt'
,
sorter
)
def
test_sort5
(
self
):
def
test_sort
0
5
(
self
):
""" Descendingly sorted by due date """
sorter
=
Sorter
(
'desc:due'
)
self
.
sort_file
(
'test/data/SorterTest5.txt'
,
'test/data/SorterTest5-result.txt'
,
sorter
)
def
test_sort6
(
self
):
def
test_sort
0
6
(
self
):
""" Ascendingly sorted by creation date """
sorter
=
Sorter
(
'creation'
)
self
.
sort_file
(
'test/data/SorterTest6.txt'
,
'test/data/SorterTest6-result.txt'
,
sorter
)
def
test_sort7
(
self
):
def
test_sort
0
7
(
self
):
""" Ascendingly sorted by completion date. """
sorter
=
Sorter
(
'completion'
)
self
.
sort_file
(
'test/data/SorterTest7.txt'
,
'test/data/SorterTest7-result.txt'
,
sorter
)
def
test_sort8
(
self
):
def
test_sort
0
8
(
self
):
""" Descendingly sorted by importance """
sorter
=
Sorter
(
'desc:importance'
)
self
.
sort_file
(
'test/data/SorterTest8.txt'
,
'test/data/SorterTest8-result.txt'
,
sorter
)
def
test_sort9
(
self
):
def
test_sort
0
9
(
self
):
"""
Sort on multiple levels: first descending importance, then
ascending priority.
...
...
test/TagCommandTest.py
View file @
842ff3ad
...
...
@@ -67,7 +67,7 @@ class TagCommandTest(CommandTest):
self
.
assertFalse
(
self
.
output
)
self
.
assertEqual
(
self
.
errors
,
"Invalid todo number.
\
n
"
)
def
test_set_tag4
(
self
):
def
test_set_tag
0
4
(
self
):
command
=
TagCommand
([
"3"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -75,7 +75,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 3| Baz due:2014-10-20
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_set_tag5
(
self
):
def
test_set_tag
0
5
(
self
):
command
=
TagCommand
([
"4"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"all"
)
command
.
execute
()
...
...
@@ -83,7 +83,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-20
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_set_tag6
(
self
):
def
test_set_tag
0
6
(
self
):
command
=
TagCommand
([
"4"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"1"
)
command
.
execute
()
...
...
@@ -91,7 +91,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-22
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_set_tag7
(
self
):
def
test_set_tag
0
7
(
self
):
command
=
TagCommand
([
"4"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"2"
)
command
.
execute
()
...
...
@@ -99,7 +99,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-20
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_set_tag8
(
self
):
def
test_set_tag
0
8
(
self
):
command
=
TagCommand
([
"4"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
""
)
command
.
execute
()
...
...
@@ -107,7 +107,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-22
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_set_tag9
(
self
):
def
test_set_tag
0
9
(
self
):
command
=
TagCommand
([
"4"
,
"due"
,
"2014-10-20"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"99"
)
command
.
execute
()
...
...
@@ -123,7 +123,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 4| Fnord due:2014-10-20 due:2014-10-20
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag1
(
self
):
def
test_rm_tag
0
1
(
self
):
command
=
TagCommand
([
"1"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -131,7 +131,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 1| Foo
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag2
(
self
):
def
test_rm_tag
0
2
(
self
):
command
=
TagCommand
([
"2"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -139,7 +139,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
"| 2| Bar
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag3
(
self
):
def
test_rm_tag
0
3
(
self
):
command
=
TagCommand
([
"4"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"all"
)
command
.
execute
()
...
...
@@ -147,7 +147,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag4
(
self
):
def
test_rm_tag
0
4
(
self
):
command
=
TagCommand
([
"4"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"1"
)
command
.
execute
()
...
...
@@ -155,7 +155,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-22
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag6
(
self
):
def
test_rm_tag
0
6
(
self
):
command
=
TagCommand
([
"4"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"99"
)
command
.
execute
()
...
...
@@ -163,7 +163,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-22
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag7
(
self
):
def
test_rm_tag
0
7
(
self
):
command
=
TagCommand
([
"4"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
,
lambda
t
:
"A"
)
command
.
execute
()
...
...
@@ -171,7 +171,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
" 1. 2014-10-20
\
n
2. 2014-10-22
\
n
| 4| Fnord due:2014-10-20 due:2014-10-22
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
def
test_rm_tag8
(
self
):
def
test_rm_tag
0
8
(
self
):
command
=
TagCommand
([
"5"
,
"due"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
@@ -179,7 +179,7 @@ class TagCommandTest(CommandTest):
self
.
assertEqual
(
self
.
output
,
""
)
self
.
assertEqual
(
self
.
errors
,
"Invalid todo number.
\
n
"
)
def
test_rm_tag9
(
self
):
def
test_rm_tag
0
9
(
self
):
command
=
TagCommand
([
"A"
,
"due"
],
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