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
620b5a1f
Commit
620b5a1f
authored
Nov 29, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent reading user-defined configuration values for testcases.
parent
8b4e11d2
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
1 deletion
+16
-1
test/AddCommandTest.py
test/AddCommandTest.py
+1
-0
test/AppendCommandTest.py
test/AppendCommandTest.py
+1
-0
test/CommandTest.py
test/CommandTest.py
+4
-0
test/DeleteCommandTest.py
test/DeleteCommandTest.py
+1
-0
test/DepCommandTest.py
test/DepCommandTest.py
+1
-0
test/DepriCommandTest.py
test/DepriCommandTest.py
+1
-0
test/DoCommandTest.py
test/DoCommandTest.py
+1
-0
test/ListCommandTest.py
test/ListCommandTest.py
+1
-0
test/PostponeCommandTest.py
test/PostponeCommandTest.py
+2
-1
test/PriorityCommandTest.py
test/PriorityCommandTest.py
+1
-0
test/SortCommandTest.py
test/SortCommandTest.py
+1
-0
test/TagCommandTest.py
test/TagCommandTest.py
+1
-0
No files found.
test/AddCommandTest.py
View file @
620b5a1f
...
...
@@ -22,6 +22,7 @@ from topydo.lib import TodoList
class
AddCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
AddCommandTest
,
self
).
setUp
()
self
.
todolist
=
TodoList
.
TodoList
([])
self
.
today
=
date
.
today
().
isoformat
()
...
...
test/AppendCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
AppendCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
AppendCommandTest
,
self
).
setUp
()
self
.
todolist
=
TodoList
([])
self
.
todolist
.
add
(
"Foo"
)
...
...
test/CommandTest.py
View file @
620b5a1f
...
...
@@ -16,6 +16,7 @@
import
unittest
from
topydo.lib.Config
import
config
from
topydo.lib.Utils
import
escape_ansi
class
CommandTest
(
unittest
.
TestCase
):
...
...
@@ -24,6 +25,9 @@ class CommandTest(unittest.TestCase):
self
.
output
=
""
self
.
errors
=
""
def
setUp
(
self
):
config
(
""
)
def
out
(
self
,
p_output
):
if
p_output
:
self
.
output
+=
escape_ansi
(
p_output
+
"
\
n
"
)
...
...
test/DeleteCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
DeleteCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
DeleteCommandTest
,
self
).
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/DepCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
DepCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
DepCommandTest
,
self
).
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/DepriCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
DepriCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
DepriCommandTest
,
self
).
setUp
()
todos
=
[
"(A) Foo"
,
"Bar"
,
...
...
test/DoCommandTest.py
View file @
620b5a1f
...
...
@@ -28,6 +28,7 @@ def _no_prompt(self):
class
DoCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
DoCommandTest
,
self
).
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/ListCommandTest.py
View file @
620b5a1f
...
...
@@ -21,6 +21,7 @@ import TestFacilities
class
ListCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
ListCommandTest
,
self
).
setUp
()
self
.
todolist
=
TestFacilities
.
load_file_to_todolist
(
"data/ListCommandTest.txt"
)
def
tearDown
(
self
):
...
...
test/PostponeCommandTest.py
View file @
620b5a1f
...
...
@@ -22,6 +22,7 @@ from topydo.lib.TodoList import TodoList
class
PostponeCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
PostponeCommandTest
,
self
).
setUp
()
self
.
today
=
date
.
today
()
self
.
past
=
date
.
today
()
-
timedelta
(
1
)
self
.
future
=
date
.
today
()
+
timedelta
(
1
)
...
...
@@ -57,7 +58,7 @@ class PostponeCommandTest(CommandTest.CommandTest):
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
" 2 Bar due:%s
\
n
"
%
due
.
isoformat
())
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_postpone3
(
self
):
command
=
PostponeCommand
([
"-s"
,
"2"
,
"1w"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/PriorityCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
PriorityCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
PriorityCommandTest
,
self
).
setUp
()
todos
=
[
"(A) Foo"
,
"Bar"
,
...
...
test/SortCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ import TestFacilities
class
SortCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
SortCommandTest
,
self
).
setUp
()
self
.
todolist
=
TestFacilities
.
load_file_to_todolist
(
"data/SorterTest1.txt"
)
def
test_sort1
(
self
):
...
...
test/TagCommandTest.py
View file @
620b5a1f
...
...
@@ -20,6 +20,7 @@ from topydo.lib.TodoList import TodoList
class
TagCommandTest
(
CommandTest
.
CommandTest
):
def
setUp
(
self
):
super
(
TagCommandTest
,
self
).
setUp
()
todos
=
[
"Foo"
,
"Bar due:2014-10-22"
,
...
...
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