[Python-checkins] cpython (3.3): Issue #19535: Fixed test_docxmlrpc when python is run with -OO.

serhiy.storchaka python-checkins at python.org
Sun Dec 8 17:16:37 CET 2013


http://hg.python.org/cpython/rev/910b1cb5176c
changeset: 87834:910b1cb5176c
branch: 3.3
parent: 87826:3580c718add3
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Dec 08 18:14:49 2013 +0200
summary:
 Issue #19535: Fixed test_docxmlrpc when python is run with -OO.
files:
 Lib/test/test_docxmlrpc.py | 6 ++++--
 Misc/NEWS | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py
--- a/Lib/test/test_docxmlrpc.py
+++ b/Lib/test/test_docxmlrpc.py
@@ -202,10 +202,12 @@
 """ Test that annotations works as expected """
 self.client.request("GET", "/")
 response = self.client.getresponse()
+ docstring = (b'' if sys.flags.optimize >= 2 else
+ b'<dd><tt>Use function annotations.</tt></dd>')
 self.assertIn(
 (b'<dl><dt><a name="-annotation"><strong>annotation</strong></a>'
- b'(x: int)</dt><dd><tt>Use function annotations.</tt>'
- b'</dd></dl>\n<dl><dt><a name="-method_annotation"><strong>'
+ b'(x: int)</dt>' + docstring + b'</dl>\n'
+ b'<dl><dt><a name="-method_annotation"><strong>'
 b'method_annotation</strong></a>(x: bytes)</dt></dl>'),
 response.read())
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -97,6 +97,8 @@
 Tests
 -----
 
+- Issue #19535: Fixed test_docxmlrpc when python is run with -OO.
+
 - Issue #19926: Removed unneeded test_main from test_abstract_numbers.
 Patch by Vajrasky Kok.
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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