diff options
author | Guido van Rossum <guido@python.org> | 2007-02-11 07:05:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-11 07:05:21 (GMT) |
commit | 87b639505bc9b03c83849d486d545c49b608b230 (patch) | |
tree | 5f13ca407df891b323562fc1cadd7cc32e9f59c0 /Lib/test | |
parent | cc2b0161257495f859200bce0aea3ed7e646feb3 (diff) | |
download | cpython-87b639505bc9b03c83849d486d545c49b608b230.zip cpython-87b639505bc9b03c83849d486d545c49b608b230.tar.gz cpython-87b639505bc9b03c83849d486d545c49b608b230.tar.bz2 |
With the help of the improved fixer, test_with.py is now fixed.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_with.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py index 5750508..3f1d358 100644 --- a/Lib/test/test_with.py +++ b/Lib/test/test_with.py @@ -550,13 +550,13 @@ class AssignmentTargetTestCase(unittest.TestCase): def testSingleComplexTarget(self): targets = {1: [0, 1, 2]} with mock_contextmanager_generator() as targets[1][0]: - self.assertEqual(targets.keys(), [1]) + self.assertEqual(list(targets.keys()), [1]) self.assertEqual(targets[1][0].__class__, MockResource) - with mock_contextmanager_generator() as targets.values()[0][1]: - self.assertEqual(targets.keys(), [1]) + with mock_contextmanager_generator() as list(targets.values())[0][1]: + self.assertEqual(list(targets.keys()), [1]) self.assertEqual(targets[1][1].__class__, MockResource) with mock_contextmanager_generator() as targets[2]: - keys = targets.keys() + keys = list(targets.keys()) keys.sort() self.assertEqual(keys, [1, 2]) class C: pass @@ -571,7 +571,7 @@ class AssignmentTargetTestCase(unittest.TestCase): targets = {1: [0, 1, 2]} with C() as (targets[1][0], targets[1][1], targets[1][2]): self.assertEqual(targets, {1: [1, 2, 3]}) - with C() as (targets.values()[0][2], targets.values()[0][1], targets.values()[0][0]): + with C() as (list(targets.values())[0][2], list(targets.values())[0][1], list(targets.values())[0][0]): self.assertEqual(targets, {1: [3, 2, 1]}) with C() as (targets[1], targets[2], targets[3]): self.assertEqual(targets, {1: 1, 2: 2, 3: 3}) |