Commit d106c563 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Fix relative imports.

parent 0cbfc6a8
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
import unittest import unittest
from topydo.lib.Utils import escape_ansi from topydo.lib.Utils import escape_ansi
import TopydoTest from test.TopydoTest import TopydoTest
class CommandTest(TopydoTest.TopydoTest): class CommandTest(TopydoTest):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(CommandTest, self).__init__(*args, **kwargs) super(CommandTest, self).__init__(*args, **kwargs)
self.output = "" self.output = ""
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
import unittest import unittest
from topydo.lib.Config import config from topydo.lib.Config import config
import TopydoTest from test.TopydoTest import TopydoTest
class ConfigTest(TopydoTest.TopydoTest): class ConfigTest(TopydoTest):
def test_config1(self): def test_config1(self):
self.assertEquals(config("test/data/config1").default_command(), 'do') self.assertEquals(config("test/data/config1").default_command(), 'do')
......
...@@ -20,11 +20,11 @@ from datetime import date, timedelta ...@@ -20,11 +20,11 @@ from datetime import date, timedelta
import unittest import unittest
from topydo.lib import Filter from topydo.lib import Filter
from TestFacilities import load_file, todolist_to_string, load_file_to_todolist from test.TestFacilities import load_file, todolist_to_string, load_file_to_todolist
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
import TopydoTest from test.TopydoTest import TopydoTest
class FilterTest(TopydoTest.TopydoTest): class FilterTest(TopydoTest):
def test_filter3(self): def test_filter3(self):
todo = Todo("(C) Relevant") todo = Todo("(C) Relevant")
relevance = Filter.RelevanceFilter() relevance = Filter.RelevanceFilter()
...@@ -302,7 +302,7 @@ class FilterTest(TopydoTest.TopydoTest): ...@@ -302,7 +302,7 @@ class FilterTest(TopydoTest.TopydoTest):
self.assertEquals(todolist_to_string(filtered_todos), self.assertEquals(todolist_to_string(filtered_todos),
todolist_to_string(reference)) todolist_to_string(reference))
class OrdinalTagFilterTest(TopydoTest.TopydoTest): class OrdinalTagFilterTest(TopydoTest):
def setUp(self): def setUp(self):
super(OrdinalTagFilterTest, self).setUp() super(OrdinalTagFilterTest, self).setUp()
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
import unittest import unittest
from topydo.lib.Graph import DirectedGraph from topydo.lib.Graph import DirectedGraph
import TopydoTest from test.TopydoTest import TopydoTest
class GraphTest(TopydoTest.TopydoTest): class GraphTest(TopydoTest):
def setUp(self): def setUp(self):
super(GraphTest, self).setUp() super(GraphTest, self).setUp()
......
...@@ -20,9 +20,9 @@ import unittest ...@@ -20,9 +20,9 @@ import unittest
from topydo.lib.Config import config from topydo.lib.Config import config
from topydo.lib.Importance import importance from topydo.lib.Importance import importance
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
import TopydoTest from test.TopydoTest import TopydoTest
class ImportanceTest(TopydoTest.TopydoTest): class ImportanceTest(TopydoTest):
def test_importance1(self): def test_importance1(self):
todo = Todo("Foo") todo = Todo("Foo")
self.assertEqual(importance(todo), 2) self.assertEqual(importance(todo), 2)
......
...@@ -20,9 +20,9 @@ import unittest ...@@ -20,9 +20,9 @@ import unittest
from topydo.lib.Config import config from topydo.lib.Config import config
from topydo.lib.Recurrence import advance_recurring_todo, strict_advance_recurring_todo, NoRecurrenceException from topydo.lib.Recurrence import advance_recurring_todo, strict_advance_recurring_todo, NoRecurrenceException
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
import TopydoTest from test.TopydoTest import TopydoTest
class RecurrenceTest(TopydoTest.TopydoTest): class RecurrenceTest(TopydoTest):
def setUp(self): def setUp(self):
super(RecurrenceTest, self).setUp() super(RecurrenceTest, self).setUp()
self.todo = Todo("Test rec:1w") self.todo = Todo("Test rec:1w")
......
...@@ -19,10 +19,10 @@ import unittest ...@@ -19,10 +19,10 @@ import unittest
from topydo.lib.Config import config from topydo.lib.Config import config
from topydo.lib.Sorter import Sorter from topydo.lib.Sorter import Sorter
from TestFacilities import load_file, todolist_to_string, load_file_to_todolist from test.TestFacilities import load_file, todolist_to_string, load_file_to_todolist
import TopydoTest from test.TopydoTest import TopydoTest
class SorterTest(TopydoTest.TopydoTest): class SorterTest(TopydoTest):
def sort_file(self, p_filename, p_filename_ref, p_sorter): def sort_file(self, p_filename, p_filename_ref, p_sorter):
""" """
Sorts a file and compares it with a reference result. Sorts a file and compares it with a reference result.
......
...@@ -21,9 +21,9 @@ import re ...@@ -21,9 +21,9 @@ import re
import unittest import unittest
from topydo.lib.TodoBase import TodoBase from topydo.lib.TodoBase import TodoBase
import TopydoTest from test.TopydoTest import TopydoTest
class TodoBaseTester(TopydoTest.TopydoTest): class TodoBaseTester(TopydoTest):
def test_parse_tag(self): def test_parse_tag(self):
todo = TodoBase("(C) Test foo:bar foo:baz foo_:baz_ blah:zah:haz") todo = TodoBase("(C) Test foo:bar foo:baz foo_:baz_ blah:zah:haz")
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
import unittest import unittest
from TestFacilities import load_file from test.TestFacilities import load_file
import TopydoTest from test.TopydoTest import TopydoTest
class TodoFileTest(TopydoTest.TopydoTest): class TodoFileTest(TopydoTest):
def test_empty_file(self): def test_empty_file(self):
todofile = load_file('test/data/TodoFileTest1.txt') todofile = load_file('test/data/TodoFileTest1.txt')
......
...@@ -24,9 +24,9 @@ from topydo.lib.Todo import Todo ...@@ -24,9 +24,9 @@ from topydo.lib.Todo import Todo
from topydo.lib.TodoFile import TodoFile from topydo.lib.TodoFile import TodoFile
from topydo.lib.TodoListBase import InvalidTodoException from topydo.lib.TodoListBase import InvalidTodoException
from topydo.lib.TodoList import TodoList from topydo.lib.TodoList import TodoList
import TopydoTest from test.TopydoTest import TopydoTest
class TodoListTester(TopydoTest.TopydoTest): class TodoListTester(TopydoTest):
def setUp(self): def setUp(self):
super(TodoListTester, self).setUp() super(TodoListTester, self).setUp()
...@@ -220,7 +220,7 @@ class TodoListTester(TopydoTest.TopydoTest): ...@@ -220,7 +220,7 @@ class TodoListTester(TopydoTest.TopydoTest):
config("test/data/todolist-uid.conf") config("test/data/todolist-uid.conf")
self.assertRaises(InvalidTodoException, self.todolist.todo, 1) self.assertRaises(InvalidTodoException, self.todolist.todo, 1)
class TodoListDependencyTester(TopydoTest.TopydoTest): class TodoListDependencyTester(TopydoTest):
def setUp(self): def setUp(self):
super(TodoListDependencyTester, self).setUp() super(TodoListDependencyTester, self).setUp()
...@@ -348,7 +348,7 @@ class TodoListDependencyTester(TopydoTest.TopydoTest): ...@@ -348,7 +348,7 @@ class TodoListDependencyTester(TopydoTest.TopydoTest):
self.assertEqual(todo1.source(), 'Foo id:1') self.assertEqual(todo1.source(), 'Foo id:1')
self.assertEqual(todo2.source(), 'Bar p:1') self.assertEqual(todo2.source(), 'Bar p:1')
class TodoListCleanDependencyTester(TopydoTest.TopydoTest): class TodoListCleanDependencyTester(TopydoTest):
def setUp(self): def setUp(self):
super(TodoListCleanDependencyTester, self).setUp() super(TodoListCleanDependencyTester, self).setUp()
......
...@@ -18,7 +18,7 @@ from datetime import date, timedelta ...@@ -18,7 +18,7 @@ from datetime import date, timedelta
import unittest import unittest
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
import TopydoTest from test.TopydoTest import TopydoTest
def today_date(): def today_date():
today = date.today() today = date.today()
...@@ -28,7 +28,7 @@ def tomorrow_date(): ...@@ -28,7 +28,7 @@ def tomorrow_date():
tomorrow = date.today() + timedelta(days=1) tomorrow = date.today() + timedelta(days=1)
return tomorrow.isoformat() return tomorrow.isoformat()
class TodoTest(TopydoTest.TopydoTest): class TodoTest(TopydoTest):
def test_due_date1(self): def test_due_date1(self):
todo = Todo("(C) Foo due:2014-06-09") todo = Todo("(C) Foo due:2014-06-09")
due = date(2014, 6, 9) due = date(2014, 6, 9)
......
...@@ -18,12 +18,12 @@ import unittest ...@@ -18,12 +18,12 @@ import unittest
from topydo.lib import Filter from topydo.lib import Filter
from topydo.lib.Sorter import Sorter from topydo.lib.Sorter import Sorter
from TestFacilities import load_file, todolist_to_string from test.TestFacilities import load_file, todolist_to_string
from topydo.lib.TodoFile import TodoFile from topydo.lib.TodoFile import TodoFile
from topydo.lib.TodoList import TodoList from topydo.lib.TodoList import TodoList
import TopydoTest from test.TopydoTest import TopydoTest
class ViewTest(TopydoTest.TopydoTest): class ViewTest(TopydoTest):
def test_view(self): def test_view(self):
""" Check filters and printer for views. """ """ Check filters and printer for views. """
todofile = TodoFile('test/data/FilterTest1.txt') todofile = TodoFile('test/data/FilterTest1.txt')
......
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