summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/util.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-12-24 11:24:00 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-12-24 11:24:00 (GMT)
commitefbcb1b038080ccb49851d0c88da740525f2f022 (patch)
tree32a57b687ed356316176b073b120ef05da8390ac /Lib/unittest/util.py
parent9d668dac6824f73f0edca15aa7b5f5ae7be5b5e2 (diff)
downloadcpython-efbcb1b038080ccb49851d0c88da740525f2f022.zip
cpython-efbcb1b038080ccb49851d0c88da740525f2f022.tar.gz
cpython-efbcb1b038080ccb49851d0c88da740525f2f022.tar.bz2
Keep helper functions private.
Diffstat (limited to 'Lib/unittest/util.py')
-rw-r--r--Lib/unittest/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/util.py b/Lib/unittest/util.py
index 9dd147a..ccdf0b8 100644
--- a/Lib/unittest/util.py
+++ b/Lib/unittest/util.py
@@ -116,7 +116,7 @@ def _count_diff_all_purpose(actual, expected):
result.append(diff)
return result
-def ordered_count(iterable):
+def _ordered_count(iterable):
'Return dict of element counts, in the order they were first seen'
c = OrderedDict()
for elem in iterable:
@@ -126,7 +126,7 @@ def ordered_count(iterable):
def _count_diff_hashable(actual, expected):
'Returns list of (cnt_act, cnt_exp, elem) triples where the counts differ'
# elements must be hashable
- s, t = ordered_count(actual), ordered_count(expected)
+ s, t = _ordered_count(actual), _ordered_count(expected)
result = []
for elem, cnt_s in s.items():
cnt_t = t.get(elem, 0)