[New-bugs-announce] [issue29726] test_xmlrpc raises DeprecationWarnings

dillon.brock report at bugs.python.org
Sun Mar 5 12:15:54 EST 2017


New submission from dillon.brock:

In 3 unit tests, test_xmlrpc calls assertRaises(Exception, expectedRegex='method'), causing DeprecationWarnings. These calls should be replaced with assertRaisesRegex(Exception, 'method').

0:20:56 [378/404] test_xmlrpc
127.0.0.1 - - [05/Mar/2017 11:53:45] "POST / HTTP/1.1" 200 -
127.0.0.1 - - [05/Mar/2017 11:53:45] "POST / HTTP/1.1" 200 -
/home/dillon/src/cpython/Lib/test/test_xmlrpc.py:430: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function
  with self.assertRaises(Exception, expected_regex='method'):
/home/dillon/src/cpython/Lib/test/test_xmlrpc.py:423: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function
  with self.assertRaises(Exception, expected_regex='method'):
/home/dillon/src/cpython/Lib/test/test_xmlrpc.py:415: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function
  with self.assertRaises(Exception, expected_regex='method'):

----------
components: Tests
messages: 289026
nosy: dillon.brock
priority: normal
severity: normal
status: open
title: test_xmlrpc raises DeprecationWarnings
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29726>
_______________________________________


More information about the New-bugs-announce mailing list