summaryrefslogtreecommitdiff
path: root/pystache/tests/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystache/tests/common.py')
-rw-r--r--pystache/tests/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pystache/tests/common.py b/pystache/tests/common.py
index 222e14f..c87e26e 100644
--- a/pystache/tests/common.py
+++ b/pystache/tests/common.py
@@ -232,6 +232,8 @@ class Attachable(object):
setattr(self, arg, value)
def __repr__(self):
+ # Sort self.__args__.iteritems() so that repr() does not depend on
+ # Python's hash seed (e.g. PYTHONHASHSEED).
return "%s(%s)" % (self.__class__.__name__,
- ", ".join("%s=%s" % (k, repr(v))
- for k, v in self.__args__.iteritems()))
+ ", ".join("%s=%s" % (k, repr(v)) for k, v in
+ sorted(self.__args__.iteritems())))