mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
8cd0a66a0f
commit
aa98058cc4
86 changed files with 622 additions and 599 deletions
|
@ -350,9 +350,9 @@ class TestStdlibRemovals(unittest.TestCase):
|
|||
try:
|
||||
__import__(module_name, level=0)
|
||||
except DeprecationWarning as exc:
|
||||
self.assertTrue(module_name in exc.args[0],
|
||||
"%s warning didn't contain module name"
|
||||
% module_name)
|
||||
self.assertIn(module_name, exc.args[0],
|
||||
"%s warning didn't contain module name"
|
||||
% module_name)
|
||||
except ImportError:
|
||||
if not optional:
|
||||
self.fail("Non-optional module {0} raised an "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue