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
95baa9ef
Commit
95baa9ef
authored
Mar 28, 2015
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional test related with append_parent_contexts
parent
8605bb1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
test/AddCommandTest.py
test/AddCommandTest.py
+20
-0
test/data/todolist-uid-contexts.conf
test/data/todolist-uid-contexts.conf
+5
-0
No files found.
test/AddCommandTest.py
View file @
95baa9ef
...
@@ -192,6 +192,26 @@ class AddCommandTest(CommandTest.CommandTest):
...
@@ -192,6 +192,26 @@ class AddCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
output
,
"|5dh| {today} Bar p:1 +Project
\
n
|5dh| {today} Bar +Project
\
n
"
.
format
(
today
=
self
.
today
))
self
.
assertEquals
(
self
.
output
,
"|5dh| {today} Bar p:1 +Project
\
n
|5dh| {today} Bar +Project
\
n
"
.
format
(
today
=
self
.
today
))
def
test_add_dep10
(
self
):
"""
The text ID shown after adding and after an 'ls' must be equal."
By appending the parent's contexts, the textual ID may change.
"""
config
(
"test/data/todolist-uid-contexts.conf"
)
# pass identitiy function to for writing output, we're not interested
# in this output
command
=
AddCommand
.
AddCommand
([
"Foo @Context"
],
self
.
todolist
,
lambda
t
:
t
,
self
.
error
)
command
.
execute
()
command
=
AddCommand
.
AddCommand
([
"Bar before:x2k"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
command
=
ListCommand
.
ListCommand
([
"Bar"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertEquals
(
self
.
output
,
"|5dc| {today} Bar p:1 @Context
\
n
|5dc| {today} Bar @Context
\
n
"
.
format
(
today
=
self
.
today
))
def
test_add_reldate1
(
self
):
def
test_add_reldate1
(
self
):
command
=
AddCommand
.
AddCommand
([
"Foo due:today"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
=
AddCommand
.
AddCommand
([
"Foo due:today"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
command
.
execute
()
...
...
test/data/todolist-uid-contexts.conf
0 → 100644
View file @
95baa9ef
[
topydo
]
identifiers
=
text
[
dep
]
append_parent_contexts
=
1
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