Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
python-pexpect
31fab7b0edbe9b3401507b5dfa4db6aaf3fabca5.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 31fab7b0edbe9b3401507b5dfa4db6aaf3fabca5.patch of Package python-pexpect
From 31fab7b0edbe9b3401507b5dfa4db6aaf3fabca5 Mon Sep 17 00:00:00 2001 From: Scott Talbert <swt@techie.net> Date: Thu, 2 Feb 2023 19:59:38 -0500 Subject: [PATCH] tests: Replace deprecated unittest.makeSuite This function was never formally documented, but has been deprecated and will be removed in Python 3.13. Replaced with unittest.TestLoader.loadTestsFromTestCase. --- tests/deprecated_test_filedescriptor.py | 2 +- tests/deprecated_test_run_out_of_pty.py | 2 +- tests/test_ansi.py | 2 +- tests/test_command_list_split.py | 2 +- tests/test_constructor.py | 2 +- tests/test_ctrl_chars.py | 2 +- tests/test_destructor.py | 2 +- tests/test_dotall.py | 2 +- tests/test_expect.py | 2 +- tests/test_filedescriptor.py | 2 +- tests/test_interact.py | 2 +- tests/test_isalive.py | 2 +- tests/test_log.py | 2 +- tests/test_misc.py | 2 +- tests/test_missing_command.py | 2 +- tests/test_performance.py | 2 +- tests/test_popen_spawn.py | 2 +- tests/test_screen.py | 2 +- tests/test_socket.py | 2 +- tests/test_timeout_pattern.py | 2 +- tests/test_unicode.py | 2 +- tests/test_winsize.py | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/deprecated_test_filedescriptor.py b/tests/deprecated_test_filedescriptor.py index 6b0ef3e8..cd930cfd 100755 --- a/tests/deprecated_test_filedescriptor.py +++ b/tests/deprecated_test_filedescriptor.py @@ -72,7 +72,7 @@ def test_fd_isatty (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) #fout = open('delete_me_1','wb') #fout.write(the_old_way) diff --git a/tests/deprecated_test_run_out_of_pty.py b/tests/deprecated_test_run_out_of_pty.py index 30901476..b34094e1 100755 --- a/tests/deprecated_test_run_out_of_pty.py +++ b/tests/deprecated_test_run_out_of_pty.py @@ -47,5 +47,5 @@ def OFF_test_run_out_of_pty (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) diff --git a/tests/test_ansi.py b/tests/test_ansi.py index 3d73fe8b..a49c6633 100755 --- a/tests/test_ansi.py +++ b/tests/test_ansi.py @@ -236,5 +236,5 @@ def test_decode_error(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ansiTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ansiTestCase) diff --git a/tests/test_command_list_split.py b/tests/test_command_list_split.py index 370f46e5..eeaf6c00 100755 --- a/tests/test_command_list_split.py +++ b/tests/test_command_list_split.py @@ -37,4 +37,4 @@ def testSplitSizes(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(SplitCommandLineTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(SplitCommandLineTestCase) diff --git a/tests/test_constructor.py b/tests/test_constructor.py index 98c473ae..1b4d7172 100755 --- a/tests/test_constructor.py +++ b/tests/test_constructor.py @@ -44,5 +44,5 @@ def test_named_parameters (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseConstructor,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseConstructor) diff --git a/tests/test_ctrl_chars.py b/tests/test_ctrl_chars.py index 032027c2..0719fc75 100755 --- a/tests/test_ctrl_chars.py +++ b/tests/test_ctrl_chars.py @@ -124,5 +124,5 @@ def test_sendcontrol(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCtrlChars,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCtrlChars) diff --git a/tests/test_destructor.py b/tests/test_destructor.py index d27b6f62..01d89a09 100755 --- a/tests/test_destructor.py +++ b/tests/test_destructor.py @@ -80,5 +80,5 @@ def test_destructor (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseDestructor,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseDestructor) diff --git a/tests/test_dotall.py b/tests/test_dotall.py index 68aef3f5..44c58c52 100755 --- a/tests/test_dotall.py +++ b/tests/test_dotall.py @@ -39,5 +39,5 @@ def test_precompiled (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseDotall,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseDotall) diff --git a/tests/test_expect.py b/tests/test_expect.py index 5e54d65c..919c98fd 100755 --- a/tests/test_expect.py +++ b/tests/test_expect.py @@ -714,4 +714,4 @@ def run(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) diff --git a/tests/test_filedescriptor.py b/tests/test_filedescriptor.py index d9164e1d..3f9d9546 100755 --- a/tests/test_filedescriptor.py +++ b/tests/test_filedescriptor.py @@ -69,4 +69,4 @@ def test_fileobj(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) diff --git a/tests/test_interact.py b/tests/test_interact.py index 4afbd18e..62b26035 100755 --- a/tests/test_interact.py +++ b/tests/test_interact.py @@ -97,5 +97,5 @@ def test_interact_exit_unicode(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(InteractTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(InteractTestCase) diff --git a/tests/test_isalive.py b/tests/test_isalive.py index 5e3021e8..ba2b5d4d 100755 --- a/tests/test_isalive.py +++ b/tests/test_isalive.py @@ -121,5 +121,5 @@ def test_expect_isalive_consistent_multiple_calls (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(IsAliveTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(IsAliveTestCase) diff --git a/tests/test_log.py b/tests/test_log.py index 4ad22569..e2defff3 100755 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -104,5 +104,5 @@ def test_log_send_and_received (self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseLog,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseLog) diff --git a/tests/test_misc.py b/tests/test_misc.py index 77847593..37a826ba 100755 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -370,4 +370,4 @@ def test_exception_tb(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseMisc,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseMisc) diff --git a/tests/test_missing_command.py b/tests/test_missing_command.py index 92e47335..37756322 100755 --- a/tests/test_missing_command.py +++ b/tests/test_missing_command.py @@ -34,5 +34,5 @@ def testMissingCommand(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(MissingCommandTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(MissingCommandTestCase) diff --git a/tests/test_performance.py b/tests/test_performance.py index d7e2cd6a..05027a0e 100755 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -110,4 +110,4 @@ def test_large_stdout_stream(self): if __name__ == "__main__": unittest.main() -suite = unittest.makeSuite(PerformanceTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(PerformanceTestCase) diff --git a/tests/test_popen_spawn.py b/tests/test_popen_spawn.py index fca7493d..96c795cb 100644 --- a/tests/test_popen_spawn.py +++ b/tests/test_popen_spawn.py @@ -136,4 +136,4 @@ def test_crlf_encoding(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) diff --git a/tests/test_screen.py b/tests/test_screen.py index 2429e57a..9e275bc4 100755 --- a/tests/test_screen.py +++ b/tests/test_screen.py @@ -282,6 +282,6 @@ def test_no_bytes(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(screenTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(screenTestCase) diff --git a/tests/test_socket.py b/tests/test_socket.py index a8c85956..548d90a6 100644 --- a/tests/test_socket.py +++ b/tests/test_socket.py @@ -277,4 +277,4 @@ def test_fileobj(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(ExpectTestCase, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(ExpectTestCase) diff --git a/tests/test_timeout_pattern.py b/tests/test_timeout_pattern.py index 5f610ef0..35d4816d 100755 --- a/tests/test_timeout_pattern.py +++ b/tests/test_timeout_pattern.py @@ -89,4 +89,4 @@ def nestedFunction (spawnInstance): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(Exp_TimeoutTestCase,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(Exp_TimeoutTestCase) diff --git a/tests/test_unicode.py b/tests/test_unicode.py index 9b5b988a..61031672 100644 --- a/tests/test_unicode.py +++ b/tests/test_unicode.py @@ -184,4 +184,4 @@ def test_unicode_argv(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(UnicodeTests, 'test') +suite = unittest.TestLoader().loadTestsFromTestCase(UnicodeTests) diff --git a/tests/test_winsize.py b/tests/test_winsize.py index be16773b..6fc78cef 100755 --- a/tests/test_winsize.py +++ b/tests/test_winsize.py @@ -55,6 +55,6 @@ def test_setwinsize(self): if __name__ == '__main__': unittest.main() -suite = unittest.makeSuite(TestCaseWinsize,'test') +suite = unittest.TestLoader().loadTestsFromTestCase(TestCaseWinsize)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor