diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-12-06 12:32:27 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-12-06 12:32:59 +0000 |
| commit | e315a8360b5a312b9b692408473d942de94557d1 (patch) | |
| tree | 2e71949fb3ad7d33b5a9e1cb60655e0d47246654 /tests | |
| parent | 323aaa3aa2bcc03c9c46b173f33b9cdfac205e74 (diff) | |
Ensure Result.messages is always unique
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lists_tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lists_tests.py b/tests/lists_tests.py new file mode 100644 index 0000000..49d5331 --- /dev/null +++ b/tests/lists_tests.py @@ -0,0 +1,13 @@ +from nose.tools import istest, assert_equal + +from mammoth.lists import unique + + +@istest +def unique_of_empty_list_is_empty_list(): + assert_equal([], unique([])) + + +@istest +def unique_removes_duplicates_while_preserving_order(): + assert_equal(["apple", "banana"], unique(["apple", "banana", "apple"])) |
