summaryrefslogtreecommitdiff
path: root/lib/testresources/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lib/testresources/tests')
-rw-r--r--lib/testresources/tests/TestUtil.py2
-rw-r--r--lib/testresources/tests/test_resource_graph.py4
-rw-r--r--lib/testresources/tests/test_test_resource.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/testresources/tests/TestUtil.py b/lib/testresources/tests/TestUtil.py
index a55dea7..b6621c2 100644
--- a/lib/testresources/tests/TestUtil.py
+++ b/lib/testresources/tests/TestUtil.py
@@ -56,7 +56,7 @@ def visitTests(suite, visitor):
visitor.visitSuite(test)
visitTests(test, visitor)
else:
- print "unvisitable non-unittest.TestCase element %r (%r)" % (test, test.__class__)
+ print("unvisitable non-unittest.TestCase element %r (%r)" % (test, test.__class__))
class TestSuite(unittest.TestSuite):
diff --git a/lib/testresources/tests/test_resource_graph.py b/lib/testresources/tests/test_resource_graph.py
index ec39300..86a3a49 100644
--- a/lib/testresources/tests/test_resource_graph.py
+++ b/lib/testresources/tests/test_resource_graph.py
@@ -132,8 +132,8 @@ class TestKruskalsMST(testtools.TestCase):
F:{ D:6},
G:{ E:9}}
result = testresources._kruskals_graph_MST(graph)
- e_weight = sum(sum(row.itervalues()) for row in expected.itervalues())
- r_weight = sum(sum(row.itervalues()) for row in result.itervalues())
+ e_weight = sum(sum(row.values()) for row in expected.values())
+ r_weight = sum(sum(row.values()) for row in result.values())
self.assertEqual(e_weight, r_weight)
self.assertEqual(expected,
testresources._kruskals_graph_MST(graph))
diff --git a/lib/testresources/tests/test_test_resource.py b/lib/testresources/tests/test_test_resource.py
index 7cde13b..fbc883b 100644
--- a/lib/testresources/tests/test_test_resource.py
+++ b/lib/testresources/tests/test_test_resource.py
@@ -36,6 +36,9 @@ class MockResourceInstance(object):
def __init__(self, name):
self._name = name
+ def __eq__(self, other):
+ return self.__dict__ == other.__dict__
+
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)