mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-45162: Remove many old deprecated unittest features (GH-28268)
* "fail*" and "assert*" aliases of TestCase methods. * Broken from start TestCase method assertDictContainsSubset(). * Ignored TestLoader.loadTestsFromModule() parameter use_load_tests. * Old alias _TextTestResult of TextTestResult.
This commit is contained in:
parent
0361335b80
commit
b0a6ede3d0
14 changed files with 61 additions and 373 deletions
|
|
@ -426,14 +426,14 @@ class TestCommandLineArgs(unittest.TestCase):
|
|||
return stderr.decode()
|
||||
|
||||
t = '_test_warnings'
|
||||
self.assertIn('Ran 7 tests', run_unittest([t]))
|
||||
self.assertIn('Ran 7 tests', run_unittest(['-k', 'TestWarnings', t]))
|
||||
self.assertIn('Ran 7 tests', run_unittest(['discover', '-p', '*_test*', '-k', 'TestWarnings']))
|
||||
self.assertIn('Ran 2 tests', run_unittest(['-k', 'f', t]))
|
||||
self.assertIn('Ran 7 tests', run_unittest(['-k', 't', t]))
|
||||
self.assertIn('Ran 3 tests', run_unittest(['-k', '*t', t]))
|
||||
self.assertIn('Ran 7 tests', run_unittest(['-k', '*test_warnings.*Warning*', t]))
|
||||
self.assertIn('Ran 1 test', run_unittest(['-k', '*test_warnings.*warning*', t]))
|
||||
self.assertIn('Ran 5 tests', run_unittest([t]))
|
||||
self.assertIn('Ran 5 tests', run_unittest(['-k', 'TestWarnings', t]))
|
||||
self.assertIn('Ran 5 tests', run_unittest(['discover', '-p', '*_test*', '-k', 'TestWarnings']))
|
||||
self.assertIn('Ran 1 test ', run_unittest(['-k', 'f', t]))
|
||||
self.assertIn('Ran 5 tests', run_unittest(['-k', 't', t]))
|
||||
self.assertIn('Ran 2 tests', run_unittest(['-k', '*t', t]))
|
||||
self.assertIn('Ran 5 tests', run_unittest(['-k', '*test_warnings.*Warning*', t]))
|
||||
self.assertIn('Ran 1 test ', run_unittest(['-k', '*test_warnings.*warning*', t]))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue