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
|
@ -81,9 +81,9 @@ class CmdLineTest(unittest.TestCase):
|
|||
print printed_file
|
||||
print printed_package
|
||||
print printed_argv0
|
||||
self.assertTrue(printed_file in data)
|
||||
self.assertTrue(printed_package in data)
|
||||
self.assertTrue(printed_argv0 in data)
|
||||
self.assertIn(printed_file, data)
|
||||
self.assertIn(printed_package, data)
|
||||
self.assertIn(printed_argv0, data)
|
||||
|
||||
def _check_import_error(self, script_name, expected_msg,
|
||||
*cmd_line_switches):
|
||||
|
@ -93,7 +93,7 @@ class CmdLineTest(unittest.TestCase):
|
|||
print 'Output from test script %r:' % script_name
|
||||
print data
|
||||
print 'Expected output: %r' % expected_msg
|
||||
self.assertTrue(expected_msg in data)
|
||||
self.assertIn(expected_msg, data)
|
||||
|
||||
def test_basic_script(self):
|
||||
with temp_dir() as script_dir:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue