Author Janne.Karila
Recipients Bbb, Janne.Karila, hynek, sbt
Date 2012-10-26.20:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351282941.06.0.666256332288.issue16307@psf.upfronthosting.co.za>
In-reply-to
Content
The length assertion protects the test from breaking with IndexError. How about this? Though, it looks like two test cases to me.

+        self.pool.map_async(int, ['1'],
+                            callback=call_args.append,
+                            error_callback=call_args.append).wait()
+        self.assertEqual(1, len(call_args))
+        self.assertEqual([1], call_args[0])
+        self.pool.map_async(int, ['a'],
+                            callback=call_args.append,
+                            error_callback=call_args.append).wait()
+        self.assertEqual(2, len(call_args))
+        self.assertIsInstance(call_args[1], ValueError)
History
Date User Action Args
2012-10-26 20:22:21Janne.Karilasetrecipients: + Janne.Karila, sbt, hynek, Bbb
2012-10-26 20:22:21Janne.Karilasetmessageid: <1351282941.06.0.666256332288.issue16307@psf.upfronthosting.co.za>
2012-10-26 20:22:21Janne.Karilalinkissue16307 messages
2012-10-26 20:22:20Janne.Karilacreate