Commit cfdd646f authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test for TodoFile.

parent d2b978c4
import Todo
import TodoFile
def load_file(p_filename):
"""
Loads a todo file from the given filename and returns a list of todos.
"""
todofile = TodoFile.TodoFile(p_filename)
return [Todo.Todo(src) for src in todofile.read()]
import unittest
from TestFacilities import load_file
class TodoFileTest(unittest.TestCase):
def test_empty_file(self):
todofile = load_file('TodoFileTest1.txt')
self.assertEquals(len(todofile), 0)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment