From b1f46c40298e741c3d6c2b01b14ef7eabc010192 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 27 Nov 2012 14:59:49 +0100 Subject: [PATCH] Tidy a couple of docstrings --- ckan/tests/functional/api/__init__.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ckan/tests/functional/api/__init__.py b/ckan/tests/functional/api/__init__.py index 0faff77c638..7db7ba168c8 100644 --- a/ckan/tests/functional/api/__init__.py +++ b/ckan/tests/functional/api/__init__.py @@ -3,9 +3,14 @@ def change_lists_to_sets(iterable): - '''recursive method to drill down into iterables to - convert any list or tuples into sets. Does not work - though for dictionaries in lists.''' + '''Convert any lists or tuples in `iterable` into sets. + + Recursively drill down into iterable and convert any list or tuples to + sets. + + Does not work for dictionaries in lists. + + ''' if isinstance(iterable, dict): for key in iterable: if isinstance(iterable[key], (list, tuple)): @@ -28,8 +33,11 @@ def change_lists_to_sets(iterable): def assert_dicts_equal_ignoring_ordering(dict1, dict2): - '''Asserts dicts are equal, assuming that the ordering of - any lists is unimportant.''' + '''Assert that dict1 and dict2 are equal. + + Assumes that the ordering of any lists in the dicts is unimportant. + + ''' dicts = [copy.deepcopy(dict1), copy.deepcopy(dict2)] for d in dicts: d = change_lists_to_sets(d)