Commit 516c22b2 authored by Stefan Behnel's avatar Stefan Behnel

fix test in Py3.1

parent 1e3fe805
......@@ -70,17 +70,17 @@ class DictSetTest(unittest.TestCase):
def test_dict_repr(self):
d = {1: 10, "a": "ABC"}
self.assertIsInstance(repr(d), str)
self.assertTrue(isinstance(repr(d), str))
r = repr(d.viewitems())
self.assertIsInstance(r, str)
self.assertTrue(isinstance(r, str))
self.assertTrue(r == "dict_items([('a', 'ABC'), (1, 10)])" or
r == "dict_items([(1, 10), ('a', 'ABC')])")
r = repr(d.viewkeys())
self.assertIsInstance(r, str)
self.assertTrue(isinstance(r, str))
self.assertTrue(r == "dict_keys(['a', 1])" or
r == "dict_keys([1, 'a'])")
r = repr(d.viewvalues())
self.assertIsInstance(r, str)
self.assertTrue(isinstance(r, str))
self.assertTrue(r == "dict_values(['ABC', 10])" or
r == "dict_values([10, 'ABC'])")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment