mirror of
https://github.com/topydo/topydo.git
synced 2024-05-20 13:58:33 +00:00
Skip the ical tests if icalendar is not installed
It is listed in setup.py as an extra
This commit is contained in:
parent
60b0e1beb0
commit
a4801840f4
|
@ -558,6 +558,11 @@ class ListCommandIcalTest(CommandTest):
|
|||
self.maxDiff = None
|
||||
|
||||
def test_ical(self):
|
||||
try:
|
||||
import icalendar
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("The icalendar module is not available")
|
||||
|
||||
todolist = load_file_to_todolist("test/data/ListCommandIcalTest.txt")
|
||||
|
||||
command = ListCommand(["-x", "-f", "ical"], todolist, self.out,
|
||||
|
@ -576,6 +581,11 @@ class ListCommandIcalTest(CommandTest):
|
|||
self.assertEqual(self.errors, "")
|
||||
|
||||
def test_ical_unicode(self):
|
||||
try:
|
||||
import icalendar
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("The icalendar module is not available")
|
||||
|
||||
todolist = load_file_to_todolist("test/data/ListCommandUnicodeTest.txt")
|
||||
|
||||
command = ListCommand(["-f", "ical"], todolist, self.out, self.error)
|
||||
|
|
Loading…
Reference in a new issue