Skip to content

Commit

Permalink
Tidy a couple of docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Nov 27, 2012
1 parent 0594077 commit b1f46c4
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ckan/tests/functional/api/__init__.py
Expand Up @@ -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)):
Expand All @@ -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)
Expand Down

0 comments on commit b1f46c4

Please sign in to comment.