From aba3e5c26b409008ed3dcf585770b8e41e34a8bf Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 17 Jan 2017 10:09:52 +0100 Subject: Port old doctests to unittest: alot.settings.checks --- tests/settings/__init__.py | 0 tests/settings/checks_test.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/settings/__init__.py create mode 100644 tests/settings/checks_test.py (limited to 'tests/settings') diff --git a/tests/settings/__init__.py b/tests/settings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/settings/checks_test.py b/tests/settings/checks_test.py new file mode 100644 index 00000000..917e2438 --- /dev/null +++ b/tests/settings/checks_test.py @@ -0,0 +1,16 @@ +# encoding=utf-8 + +import unittest + +from alot.settings import checks + + +class TestForceList(unittest.TestCase): + + def test_strings_are_converted_to_single_item_lists(self): + forced = checks.force_list('hello') + self.assertEqual(forced, ['hello']) + + def test_empty_strings_are_converted_to_empty_lists(self): + forced = checks.force_list('') + self.assertEqual(forced, []) -- cgit v1.2.3