diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-01-17 10:09:52 +0100 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-01-18 00:29:07 +0100 |
commit | aba3e5c26b409008ed3dcf585770b8e41e34a8bf (patch) | |
tree | 67ade8e25184d922910f209b5e254a623c155d8f /tests/settings | |
parent | bf3b870652ed35a20589c5302644a17a82f1dd9a (diff) |
Port old doctests to unittest: alot.settings.checks
Diffstat (limited to 'tests/settings')
-rw-r--r-- | tests/settings/__init__.py | 0 | ||||
-rw-r--r-- | tests/settings/checks_test.py | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/settings/__init__.py b/tests/settings/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/settings/__init__.py 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, []) |