[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-31 Thread py.user
py.user added the comment: What second line? the second line patched in the diff file -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18573 ___

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-30 Thread py.user
py.user added the comment: What about the second line? It doesn't catch any exception utest.py #!/usr/bin/env python3 import unittest class Test(unittest.TestCase): def test_warning(self): import warnings with self.assertWarns(RuntimeWarning) as cm: raise

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: What about the second line? What second line? It doesn't catch any exception It? I do not understand your point. Your example works as documented, including any unexpected exception is an error. Actually, that should be 'any exception' as none is expected.

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 366beee880aa by Terry Jan Reedy in branch '3.3': Issue #18573: More copy-paste fixes to assertWarns entry. http://hg.python.org/cpython/rev/366beee880aa -- ___ Python tracker rep...@bugs.python.org

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread py.user
New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestCase.assertWarns When used as a context manager, assertRaises() accepts ... is to perform additional checks on the exception raised -- assignee: docs@python components: Documentation files:

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - needs patch versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18573 ___

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: docs@python - terry.reedy nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18573 ___

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 55dcf9e065be by Terry Jan Reedy in branch '3.3': Issue #18573: Complete copy-paste from assertRaises entry to assertWarns entry. http://hg.python.org/cpython/rev/55dcf9e065be -- nosy: +python-dev ___

[issue18573] In unittest.TestCase.assertWarns doc there is some text about assertRaises()

2013-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: assertWarns is new in 3.2 and not in 2.7. The sentence was copied from the assertRaises section but not changed. Thanks for reporting. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed type: enhancement - behavior