Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(13)  |  Derive(0)  |  Import(2)

src/t/o/Todo-Indicator-HEAD/todotxt/indicator.py   Todo-Indicator(Download)
from list import TodoTxtList
        # Initialize the main list object:
        self.todo_list = TodoTxtList(todo_filename)
        # Non-list menu items:

src/t/o/Todo-Indicator-HEAD/todotxt/test_list.py   Todo-Indicator(Download)
import unittest
from list import TodoTxtList
class TestTodoTxtList(unittest.TestCase):
    def test_init_from_text(self):
        todo_text = "(A) Item one\n(Z) Item two\nx Item three\n\n \n"
        test_list = TodoTxtList(None, todo_text)
    def test_init_from_file(self):
        file_name = 'sample-todo.txt'
        test_list = TodoTxtList(file_name)
        self.assertEqual(8, test_list.num_items())
    def test_reload_from_file(self):
        test_list = TodoTxtList() # Start with an empty list
        test_list.reload_from_file() # Should do nothing
        test_list.todo_filename = 'sample-todo.txt'
    def test_has_items(self):
        test_list = TodoTxtList()
        test_list = TodoTxtList(None, 'An item')