Commit d106c563 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Fix relative imports.

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