From 3e60a9d602c85b738dc74a3c8a196650822e8619 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 8 Dec 2013 18:14:49 +0200 Subject: Issue #19535: Fixed test_docxmlrpc when python is run with -OO. --- 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 index 7086d9a..cb6366c 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 5a760ba..0eac7fb 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. -- cgit v0.12