From: Serhiy Storchaka Date: Sun, 8 Dec 2013 16:14:49 +0000 (+0200) Subject: Issue #19535: Fixed test_docxmlrpc when python is run with -OO. X-Git-Tag: v3.4.0b2~294^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e60a9d602c85b738dc74a3c8a196650822e8619;p=thirdparty%2FPython%2Fcpython.git Issue #19535: Fixed test_docxmlrpc when python is run with -OO. --- diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py index 7086d9a6a122..cb6366c7d5c2 100644 --- a/Lib/test/test_docxmlrpc.py +++ b/Lib/test/test_docxmlrpc.py @@ -202,10 +202,12 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase): """ Test that annotations works as expected """ self.client.request("GET", "/") response = self.client.getresponse() + docstring = (b'' if sys.flags.optimize >= 2 else + b'
Use function annotations.
') self.assertIn( (b'
annotation' - b'(x: int)
Use function annotations.' - b'
\n
' + b'(x: int)
' + docstring + b'
\n' + b'
' b'method_annotation(x: bytes)
'), response.read()) diff --git a/Misc/NEWS b/Misc/NEWS index 5a760ba625c4..0eac7fb2ad74 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -97,6 +97,8 @@ Library 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.