diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-08 18:16:18 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-08 18:16:18 +0200 |
commit | b12cb6a5509dbaafa05706dd64861bfef9fa42d7 (patch) | |
tree | d0021701f3d6d5cba2c293bf769c861e39f6f9b1 /Lib/test/test_docxmlrpc.py | |
parent | ca616a2709951f2ef8534aaa5933af4cc9d1594d (diff) | |
parent | 3e60a9d602c85b738dc74a3c8a196650822e8619 (diff) | |
download | cpython-git-b12cb6a5509dbaafa05706dd64861bfef9fa42d7.tar.gz |
Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
test_statistics when python is run with -OO.
Diffstat (limited to 'Lib/test/test_docxmlrpc.py')
-rw-r--r-- | Lib/test/test_docxmlrpc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py index 7086d9a6a1..cb6366c7d5 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'<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()) |