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
6fea9f00
Commit
6fea9f00
authored
Nov 05, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for sorting by context and projects.
parent
9693544b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
test/data/SorterTest13-result-context.txt
test/data/SorterTest13-result-context.txt
+3
-0
test/data/SorterTest13-result-project.txt
test/data/SorterTest13-result-project.txt
+3
-0
test/data/SorterTest13.txt
test/data/SorterTest13.txt
+3
-0
test/test_sorter.py
test/test_sorter.py
+19
-0
No files found.
test/data/SorterTest13-result-context.txt
0 → 100644
View file @
6fea9f00
Todo item with +project3 @context1
Todo item with +Project2 @Context2
Todo item with +project1 @context3
test/data/SorterTest13-result-project.txt
0 → 100644
View file @
6fea9f00
Todo item with +project1 @context3
Todo item with +Project2 @Context2
Todo item with +project3 @context1
test/data/SorterTest13.txt
0 → 100644
View file @
6fea9f00
Todo item with +Project2 @Context2
Todo item with +project1 @context3
Todo item with +project3 @context1
test/test_sorter.py
View file @
6fea9f00
...
@@ -170,5 +170,24 @@ class SorterTest(TopydoTest):
...
@@ -170,5 +170,24 @@ class SorterTest(TopydoTest):
self
.
assertEqual
(
print_view
(
view
),
todolist_to_string
(
result
))
self
.
assertEqual
(
print_view
(
view
),
todolist_to_string
(
result
))
def
test_sort17
(
self
):
"""
Check sorting by project.
"""
sorter
=
Sorter
(
'project'
)
self
.
sort_file
(
'test/data/SorterTest13.txt'
,
'test/data/SorterTest13-result-project.txt'
,
sorter
)
def
test_sort18
(
self
):
"""
Check sorting by context.
"""
sorter
=
Sorter
(
'context'
)
self
.
sort_file
(
'test/data/SorterTest13.txt'
,
'test/data/SorterTest13-result-context.txt'
,
sorter
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
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