[Python-checkins] cpython (merge 3.3 -> default): merge

raymond.hettinger python-checkins at python.org
Fri Mar 22 15:27:32 CET 2013


http://hg.python.org/cpython/rev/6e25e5dbb269
changeset: 82879:6e25e5dbb269
parent: 82876:a2128cb22372
parent: 82878:5540ed8c9824
user: Raymond Hettinger <python at rcn.com>
date: Fri Mar 22 07:26:57 2013 -0700
summary:
 merge
files:
 Doc/tutorial/stdlib.rst | 6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -281,8 +281,10 @@
 def test_average(self):
 self.assertEqual(average([20, 30, 70]), 40.0)
 self.assertEqual(round(average([1, 5, 7]), 1), 4.3)
- self.assertRaises(ZeroDivisionError, average, [])
- self.assertRaises(TypeError, average, 20, 30, 70)
+ with self.assertRaises(ZeroDivisionError):
+ average([])
+ with self.assertRaises(TypeError):
+ average(20, 30, 70)
 
 unittest.main() # Calling from the command line invokes all tests
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /