mirror of
https://github.com/topydo/topydo.git
synced 2024-05-20 13:58:33 +00:00
Import from own directory using the dot notation
'test' is not really a library that has to be imported
This commit is contained in:
parent
b8b816da59
commit
c13c9fb972
|
@ -1,2 +1,3 @@
|
||||||
[settings]
|
[settings]
|
||||||
skip=topydo/ui/CLIApplicationBase.py
|
skip=topydo/ui/CLIApplicationBase.py
|
||||||
|
known_first_party=topydo
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Utils import escape_ansi
|
from topydo.lib.Utils import escape_ansi
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class CommandTest(TopydoTest):
|
class CommandTest(TopydoTest):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
@ -17,12 +17,13 @@
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands import AddCommand, ListCommand
|
from topydo.commands import AddCommand, ListCommand
|
||||||
from topydo.lib import TodoList
|
from topydo.lib import TodoList
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
# We're searching for 'mock'
|
# We're searching for 'mock'
|
||||||
# pylint: disable=no-name-in-module
|
# pylint: disable=no-name-in-module
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.AppendCommand import AppendCommand
|
from topydo.commands.AppendCommand import AppendCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class AppendCommandTest(CommandTest):
|
class AppendCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,12 +15,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from topydo.commands.ArchiveCommand import ArchiveCommand
|
from topydo.commands.ArchiveCommand import ArchiveCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
|
|
||||||
class ArchiveCommandTest(CommandTest):
|
class ArchiveCommandTest(CommandTest):
|
||||||
def test_archive(self):
|
def test_archive(self):
|
||||||
|
|
|
@ -17,12 +17,13 @@
|
||||||
""" Tests for the colorscheme functionality. """
|
""" Tests for the colorscheme functionality. """
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Color import Color
|
from topydo.lib.Color import Color
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
NEUTRAL_COLOR = '\033[0m'
|
NEUTRAL_COLOR = '\033[0m'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class ConfigTest(TopydoTest):
|
class ConfigTest(TopydoTest):
|
||||||
def test_config01(self):
|
def test_config01(self):
|
||||||
|
|
|
@ -15,13 +15,14 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.DeleteCommand import DeleteCommand
|
from topydo.commands.DeleteCommand import DeleteCommand
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
from topydo.lib.TodoListBase import InvalidTodoException
|
from topydo.lib.TodoListBase import InvalidTodoException
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
def _yes_prompt(self):
|
def _yes_prompt(self):
|
||||||
return "y"
|
return "y"
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.DepCommand import DepCommand
|
from topydo.commands.DepCommand import DepCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class DepCommandTest(CommandTest):
|
class DepCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.DepriCommand import DepriCommand
|
from topydo.commands.DepriCommand import DepriCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class DepriCommandTest(CommandTest):
|
class DepriCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.DoCommand import DoCommand
|
from topydo.commands.DoCommand import DoCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
def _yes_prompt(self):
|
def _yes_prompt(self):
|
||||||
return "y"
|
return "y"
|
||||||
|
|
|
@ -16,13 +16,14 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.EditCommand import EditCommand
|
from topydo.commands.EditCommand import EditCommand
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
# We're searching for 'mock'
|
# We're searching for 'mock'
|
||||||
# pylint: disable=no-name-in-module
|
# pylint: disable=no-name-in-module
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.facilities import (load_file, load_file_to_todolist,
|
|
||||||
todolist_to_string)
|
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib import Filter
|
from topydo.lib import Filter
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
|
||||||
|
from .facilities import load_file, load_file_to_todolist, todolist_to_string
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class FilterTest(TopydoTest):
|
class FilterTest(TopydoTest):
|
||||||
def test_filter03(self):
|
def test_filter03(self):
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.Commands import get_subcommand
|
from topydo.Commands import get_subcommand
|
||||||
from topydo.commands.AddCommand import AddCommand
|
from topydo.commands.AddCommand import AddCommand
|
||||||
|
@ -24,6 +23,8 @@ from topydo.commands.ListCommand import ListCommand
|
||||||
from topydo.commands.TagCommand import TagCommand
|
from topydo.commands.TagCommand import TagCommand
|
||||||
from topydo.lib.Config import ConfigError, config
|
from topydo.lib.Config import ConfigError, config
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class GetSubcommandTest(TopydoTest):
|
class GetSubcommandTest(TopydoTest):
|
||||||
def test_normal_cmd(self):
|
def test_normal_cmd(self):
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Graph import DirectedGraph
|
from topydo.lib.Graph import DirectedGraph
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class GraphTest(TopydoTest):
|
class GraphTest(TopydoTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
|
@ -24,6 +23,8 @@ 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
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
@freeze_time("2015, 11, 06")
|
@freeze_time("2015, 11, 06")
|
||||||
class ImportanceTest(TopydoTest):
|
class ImportanceTest(TopydoTest):
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.printers.Json import JsonPrinter
|
from topydo.lib.printers.Json import JsonPrinter
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class JsonPrinterTest(TopydoTest):
|
class JsonPrinterTest(TopydoTest):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -20,8 +20,6 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
|
@ -29,6 +27,9 @@ from topydo.commands.ListCommand import ListCommand
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
# We're searching for 'mock'
|
# We're searching for 'mock'
|
||||||
# 'mock' was added as 'unittest.mock' in Python 3.3, but PyPy 3 is based on Python 3.2
|
# 'mock' was added as 'unittest.mock' in Python 3.3, but PyPy 3 is based on Python 3.2
|
||||||
# pylint: disable=no-name-in-module
|
# pylint: disable=no-name-in-module
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from topydo.commands.ListContextCommand import ListContextCommand
|
from topydo.commands.ListContextCommand import ListContextCommand
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
|
|
||||||
class ListContextCommandTest(CommandTest):
|
class ListContextCommandTest(CommandTest):
|
||||||
def test_contexts1(self):
|
def test_contexts1(self):
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
|
@ -25,6 +23,9 @@ from topydo.commands.ListCommand import ListCommand
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.TodoListBase import TodoListBase
|
from topydo.lib.TodoListBase import TodoListBase
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
# We're searching for 'mock'
|
# We're searching for 'mock'
|
||||||
# 'mock' was added as 'unittest.mock' in Python 3.3, but PyPy 3 is based on Python 3.2
|
# 'mock' was added as 'unittest.mock' in Python 3.3, but PyPy 3 is based on Python 3.2
|
||||||
# pylint: disable=no-name-in-module
|
# pylint: disable=no-name-in-module
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from topydo.commands.ListProjectCommand import ListProjectCommand
|
from topydo.commands.ListProjectCommand import ListProjectCommand
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
|
|
||||||
class ListProjectCommandTest(CommandTest):
|
class ListProjectCommandTest(CommandTest):
|
||||||
def test_projects1(self):
|
def test_projects1(self):
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.PostponeCommand import PostponeCommand
|
from topydo.commands.PostponeCommand import PostponeCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class PostponeCommandTest(CommandTest):
|
class PostponeCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from topydo.commands.PriorityCommand import PriorityCommand
|
from topydo.commands.PriorityCommand import PriorityCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class PriorityCommandTest(CommandTest):
|
class PriorityCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
|
@ -24,6 +23,8 @@ from topydo.lib.ProgressColor import progress_color
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
def set_256_colors():
|
def set_256_colors():
|
||||||
config(p_overrides={('topydo', 'colors'): '256'})
|
config(p_overrides={('topydo', 'colors'): '256'})
|
||||||
|
|
|
@ -16,12 +16,13 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.Recurrence import NoRecurrenceException, advance_recurring_todo
|
from topydo.lib.Recurrence import NoRecurrenceException, advance_recurring_todo
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class RecurrenceTest(TopydoTest):
|
class RecurrenceTest(TopydoTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -16,12 +16,13 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
from topydo.lib.RelativeDate import relative_date_to_date
|
from topydo.lib.RelativeDate import relative_date_to_date
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
@freeze_time('2015, 11, 06')
|
@freeze_time('2015, 11, 06')
|
||||||
class RelativeDateTester(TopydoTest):
|
class RelativeDateTester(TopydoTest):
|
||||||
|
|
|
@ -19,7 +19,6 @@ import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from topydo.commands.AddCommand import AddCommand
|
from topydo.commands.AddCommand import AddCommand
|
||||||
|
@ -32,6 +31,8 @@ from topydo.lib.Config import config
|
||||||
from topydo.lib.TodoFile import TodoFile
|
from topydo.lib.TodoFile import TodoFile
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class RevertCommandTest(CommandTest):
|
class RevertCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,12 +15,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
from test.facilities import load_file_to_todolist
|
|
||||||
|
|
||||||
from topydo.commands.SortCommand import SortCommand
|
from topydo.commands.SortCommand import SortCommand
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
from .facilities import load_file_to_todolist
|
||||||
|
|
||||||
|
|
||||||
class SortCommandTest(CommandTest):
|
class SortCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,15 +15,16 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.facilities import (load_file, load_file_to_todolist, print_view,
|
|
||||||
todolist_to_string)
|
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
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 .facilities import (load_file, load_file_to_todolist, print_view,
|
||||||
|
todolist_to_string)
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
@freeze_time("2016, 04, 25")
|
@freeze_time("2016, 04, 25")
|
||||||
class SorterTest(TopydoTest):
|
class SorterTest(TopydoTest):
|
||||||
|
|
|
@ -15,13 +15,14 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.command_testcase import CommandTest
|
|
||||||
|
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
|
|
||||||
from topydo.commands.TagCommand import TagCommand
|
from topydo.commands.TagCommand import TagCommand
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .command_testcase import CommandTest
|
||||||
|
|
||||||
|
|
||||||
class TagCommandTest(CommandTest):
|
class TagCommandTest(CommandTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -16,10 +16,11 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
def today_date():
|
def today_date():
|
||||||
today = date.today()
|
today = date.today()
|
||||||
|
|
|
@ -19,10 +19,11 @@
|
||||||
import re
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.TodoBase import TodoBase
|
from topydo.lib.TodoBase import TodoBase
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class TodoBaseTester(TopydoTest):
|
class TodoBaseTester(TopydoTest):
|
||||||
def test_parse_tag(self):
|
def test_parse_tag(self):
|
||||||
|
|
|
@ -15,8 +15,9 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.facilities import load_file
|
|
||||||
from test.topydo_testcase import TopydoTest
|
from .facilities import load_file
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class TodoFileTest(TopydoTest):
|
class TodoFileTest(TopydoTest):
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Config import config
|
from topydo.lib.Config import config
|
||||||
from topydo.lib.Todo import Todo
|
from topydo.lib.Todo import Todo
|
||||||
|
@ -26,6 +25,8 @@ from topydo.lib.TodoFile import TodoFile
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
from topydo.lib.TodoListBase import InvalidTodoException, TodoListBase
|
from topydo.lib.TodoListBase import InvalidTodoException, TodoListBase
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class TodoListTester(TopydoTest):
|
class TodoListTester(TopydoTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib.Utils import translate_key_to_config
|
from topydo.lib.Utils import translate_key_to_config
|
||||||
|
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class UtilsTest(TopydoTest):
|
class UtilsTest(TopydoTest):
|
||||||
def test_key_to_cfg(self):
|
def test_key_to_cfg(self):
|
||||||
|
|
|
@ -15,14 +15,15 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.facilities import load_file, print_view, todolist_to_string
|
|
||||||
from test.topydo_testcase import TopydoTest
|
|
||||||
|
|
||||||
from topydo.lib import Filter
|
from topydo.lib import Filter
|
||||||
from topydo.lib.Sorter import Sorter
|
from topydo.lib.Sorter import Sorter
|
||||||
from topydo.lib.TodoFile import TodoFile
|
from topydo.lib.TodoFile import TodoFile
|
||||||
from topydo.lib.TodoList import TodoList
|
from topydo.lib.TodoList import TodoList
|
||||||
|
|
||||||
|
from .facilities import load_file, print_view, todolist_to_string
|
||||||
|
from .topydo_testcase import TopydoTest
|
||||||
|
|
||||||
|
|
||||||
class ViewTest(TopydoTest):
|
class ViewTest(TopydoTest):
|
||||||
def test_view(self):
|
def test_view(self):
|
||||||
|
|
Loading…
Reference in a new issue