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
a6e5ed2c
Commit
a6e5ed2c
authored
Jun 06, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve test coverage of the IcalPrinter.
parent
26ee8f39
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
test/ListCommandTest.py
test/ListCommandTest.py
+5
-2
test/data/ListCommandIcalTest.txt
test/data/ListCommandIcalTest.txt
+7
-0
test/data/ListCommandTest.ics
test/data/ListCommandTest.ics
+0
-0
topydo/lib/IcalPrinter.py
topydo/lib/IcalPrinter.py
+0
-3
No files found.
test/ListCommandTest.py
View file @
a6e5ed2c
...
...
@@ -265,11 +265,14 @@ def replace_ical_tags(p_text):
IS_PYTHON_32
=
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
==
(
3
,
2
)
class
ListCommandIcalTest
(
CommandTest
):
def
setUp
(
self
):
self
.
maxDiff
=
None
@
unittest
.
skipIf
(
IS_PYTHON_32
,
"icalendar is not supported for Python 3.2"
)
def
test_ical
(
self
):
todolist
=
load_file_to_todolist
(
"test/data/ListCommandTest.txt"
)
todolist
=
load_file_to_todolist
(
"test/data/ListCommand
Ical
Test.txt"
)
command
=
ListCommand
([
"-f"
,
"ical"
],
todolist
,
self
.
out
,
self
.
error
)
command
=
ListCommand
([
"-
x"
,
"-
f"
,
"ical"
],
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertTrue
(
todolist
.
is_dirty
())
...
...
test/data/ListCommandIcalTest.txt
0 → 100644
View file @
a6e5ed2c
(C) Foo @Context2 Not@Context +Project1 Not+Project
(D) Bar @Context1 +Project2 p:1 due:2015-06-06
(C) Baz @Context1 +Project1 key:value id:1
(C) 2015-06-06 Drink beer @ home
(G) 13 + 29 = 42
(C) Only a start date t:2015-06-06
x 2015-06-06 A completed item due:2015-05-05
test/data/ListCommandTest.ics
View file @
a6e5ed2c
This diff was suppressed by a .gitattributes entry.
topydo/lib/IcalPrinter.py
View file @
a6e5ed2c
...
...
@@ -75,9 +75,6 @@ class IcalPrinter(Printer):
# too much. Therefore just disable the iCalendar functionality
self
.
icalendar
=
None
def
print_todo
(
self
,
p_todo
):
return
self
.
_convert_todo
(
p_todo
).
to_ical
()
if
self
.
icalendar
else
""
def
print_list
(
self
,
p_todos
):
result
=
""
...
...
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