Show More
@@ -81,13 +81,13 b' class AsyncResultTest(ClusterTestCase):' | |||
|
81 | 81 | |
|
82 | 82 | def test_getattr(self): |
|
83 | 83 | ar = self.client[:].apply_async(wait, 0.5) |
|
84 | self.assertEqual(ar.engine_id, [None] * len(ar)) | |
|
84 | 85 | self.assertRaises(AttributeError, lambda : ar._foo) |
|
85 | 86 | self.assertRaises(AttributeError, lambda : ar.__length_hint__()) |
|
86 | 87 | self.assertRaises(AttributeError, lambda : ar.foo) |
|
87 | self.assertRaises(AttributeError, lambda : ar.engine_id) | |
|
88 | 88 | self.assertFalse(hasattr(ar, '__length_hint__')) |
|
89 | 89 | self.assertFalse(hasattr(ar, 'foo')) |
|
90 |
self.assert |
|
|
90 | self.assertTrue(hasattr(ar, 'engine_id')) | |
|
91 | 91 | ar.get(5) |
|
92 | 92 | self.assertRaises(AttributeError, lambda : ar._foo) |
|
93 | 93 | self.assertRaises(AttributeError, lambda : ar.__length_hint__()) |
@@ -100,8 +100,8 b' class AsyncResultTest(ClusterTestCase):' | |||
|
100 | 100 | |
|
101 | 101 | def test_getitem(self): |
|
102 | 102 | ar = self.client[:].apply_async(wait, 0.5) |
|
103 | self.assertRaises(TimeoutError, lambda : ar['foo']) | |
|
104 |
self.assertRaises( |
|
|
103 | self.assertEqual(ar['engine_id'], [None] * len(ar)) | |
|
104 | self.assertRaises(KeyError, lambda : ar['foo']) | |
|
105 | 105 | ar.get(5) |
|
106 | 106 | self.assertRaises(KeyError, lambda : ar['foo']) |
|
107 | 107 | self.assertTrue(isinstance(ar['engine_id'], list)) |
@@ -109,8 +109,8 b' class AsyncResultTest(ClusterTestCase):' | |||
|
109 | 109 | |
|
110 | 110 | def test_single_result(self): |
|
111 | 111 | ar = self.client[-1].apply_async(wait, 0.5) |
|
112 |
self.assertRaises( |
|
|
113 |
self.assert |
|
|
112 | self.assertRaises(KeyError, lambda : ar['foo']) | |
|
113 | self.assertEqual(ar['engine_id'], None) | |
|
114 | 114 | self.assertTrue(ar.get(5) == 0.5) |
|
115 | 115 | self.assertTrue(isinstance(ar['engine_id'], int)) |
|
116 | 116 | self.assertTrue(isinstance(ar.engine_id, int)) |
General Comments 0
You need to be logged in to leave comments.
Login now