From 24879dd65175767c740c4f6cff1f5baf2b9dd7c6 Mon Sep 17 00:00:00 2001 From: Gbkng Date: Wed, 14 Feb 2024 20:07:46 +0100 Subject: [PATCH] style(test): autoflake for unused import and unused vars --- test/test_020_debug.py | 3 --- test/test_021_versionMinorMajorPatch.py | 3 --- test/test_024_logging.py | 6 ------ test/test_035_pyconf.py | 3 --- test/test_100_satHelp.py | 5 +---- test/test_500_APPLI_TEST.py | 7 ++----- test/test_501_paramiko.py | 2 -- test/test_sat5_0/compilation/test_compilation.py | 2 -- test/test_sat5_0/compilation/test_configure.py | 2 -- test/test_sat5_0/compilation/test_make.py | 2 -- test/test_sat5_0/compilation/test_makeinstall.py | 2 -- test/test_sat5_0/config/test_create_user_pyconf.py | 2 -- test/test_sat5_0/config/test_option_copy.py | 2 -- test/test_sat5_0/config/test_option_edit.py | 3 --- test/test_sat5_0/config/test_option_value.py | 3 --- test/test_sat5_0/config/test_option_value_2.py | 3 --- test/test_sat5_0/environ/test_environ.py | 2 -- test/test_sat5_0/job/test_job.py | 2 -- test/test_sat5_0/jobs/test_jobs.py | 2 -- test/test_sat5_0/log/test_launch_browser.py | 3 +-- test/test_sat5_0/log/test_launch_browser2.py | 3 --- test/test_sat5_0/prepare/test_clean.py | 2 -- test/test_sat5_0/prepare/test_patch.py | 2 -- test/test_sat5_0/prepare/test_prepare.py | 2 -- test/test_sat5_0/prepare/test_source.py | 2 -- test/test_sat5_0/shell/test_shell.py | 2 -- test/test_sat5_0/test/test_command.py | 2 -- 27 files changed, 4 insertions(+), 70 deletions(-) diff --git a/test/test_020_debug.py b/test/test_020_debug.py index 9d09ca8..fb7e173 100755 --- a/test/test_020_debug.py +++ b/test/test_020_debug.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import unittest import initializeTest # set PATH etc for test @@ -121,4 +119,3 @@ class TestCase(unittest.TestCase): if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_021_versionMinorMajorPatch.py b/test/test_021_versionMinorMajorPatch.py index 0da8c69..a268e6f 100755 --- a/test/test_021_versionMinorMajorPatch.py +++ b/test/test_021_versionMinorMajorPatch.py @@ -29,8 +29,6 @@ and range of versions | PATCH version when you make backwards-compatible bug fixes. """ -import os -import sys import unittest import pprint as PP @@ -255,4 +253,3 @@ toto_from_2""".split( if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_024_logging.py b/test/test_024_logging.py index 3d4d0c1..6713cc6 100755 --- a/test/test_024_logging.py +++ b/test/test_024_logging.py @@ -46,12 +46,8 @@ see: http://sametmax.com/ecrire-des-logs-en-python | logger.warning('Testing %s', 'foo') """ -import os -import sys import unittest -import pprint as PP import logging as LOGI -from logging.handlers import BufferingHandler import src.debug as DBG @@ -104,7 +100,6 @@ class TestCase(unittest.TestCase): if verbose: DBG.push_debug(True) # DBG.write("assert unittest", [a for a in dir(self) if "assert" in a]) - pass def test_999(self): # one shot tearDown() for this TestCase @@ -156,4 +151,3 @@ class TestCase(unittest.TestCase): if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_035_pyconf.py b/test/test_035_pyconf.py index a62f149..c465937 100755 --- a/test/test_035_pyconf.py +++ b/test/test_035_pyconf.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import unittest import initializeTest # set PATH etc for test @@ -256,4 +254,3 @@ Bienvenue, Yves if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_100_satHelp.py b/test/test_100_satHelp.py index d092136..18d3a6d 100755 --- a/test/test_100_satHelp.py +++ b/test/test_100_satHelp.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import unittest import initializeTest # set PATH etc for test @@ -43,7 +41,7 @@ class TestCase(unittest.TestCase): self.assertFalse("CRITICAL" in logs) def test_000(self): - logger = LOG.getUnittestLogger() + LOG.getUnittestLogger() # one shot setUp() for this TestCase if self.debug: DBG.push_debug(True) @@ -145,4 +143,3 @@ class TestCase(unittest.TestCase): if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_500_APPLI_TEST.py b/test/test_500_APPLI_TEST.py index 8c246fb..d928526 100755 --- a/test/test_500_APPLI_TEST.py +++ b/test/test_500_APPLI_TEST.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import unittest import initializeTest # set PATH etc for test @@ -65,7 +63,7 @@ class TestCase(unittest.TestCase): self.assertFalse("CRITICAL ::" in logs) def test_000(self): - logger = LOG.getUnittestLogger() + LOG.getUnittestLogger() # one shot setUp() for this TestCase if self.debug: DBG.push_debug(True) @@ -123,11 +121,10 @@ class TestCase(unittest.TestCase): s = SAT.Sat(logger) DBG.write("test_120 'sat %s'" % cmd, "expected raise", dbg) with self.assertRaises(Exception): - returnCode = s.execute_cli(cmd) + s.execute_cli(cmd) logs = logger.getLogsAndClear() DBG.write("logs", logs, dbg) if __name__ == "__main__": unittest.main(exit=False) - pass diff --git a/test/test_501_paramiko.py b/test/test_501_paramiko.py index 9e2308f..db18987 100755 --- a/test/test_501_paramiko.py +++ b/test/test_501_paramiko.py @@ -92,7 +92,6 @@ to set id_rsa from/to reflexive on local machine: """ import os -import sys import unittest import getpass @@ -203,4 +202,3 @@ class TestCase(unittest.TestCase): if __name__ == "__main__": # verbose = True # human eyes unittest.main(exit=False) - pass diff --git a/test/test_sat5_0/compilation/test_compilation.py b/test/test_sat5_0/compilation/test_compilation.py index 807b1d7..0a48ae3 100755 --- a/test/test_sat5_0/compilation/test_compilation.py +++ b/test/test_sat5_0/compilation/test_compilation.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest import src.product @@ -269,4 +268,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/compilation/test_configure.py b/test/test_sat5_0/compilation/test_configure.py index c9ac3d7..54be010 100755 --- a/test/test_sat5_0/compilation/test_configure.py +++ b/test/test_sat5_0/compilation/test_configure.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest import src.product @@ -118,4 +117,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/compilation/test_make.py b/test/test_sat5_0/compilation/test_make.py index b00fd8d..fc5b5b5 100755 --- a/test/test_sat5_0/compilation/test_make.py +++ b/test/test_sat5_0/compilation/test_make.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest import src.product @@ -111,4 +110,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/compilation/test_makeinstall.py b/test/test_sat5_0/compilation/test_makeinstall.py index 6793b0a..842c1cf 100755 --- a/test/test_sat5_0/compilation/test_makeinstall.py +++ b/test/test_sat5_0/compilation/test_makeinstall.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest import src.product @@ -73,4 +72,3 @@ class TestMakeinstall(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/config/test_create_user_pyconf.py b/test/test_sat5_0/config/test_create_user_pyconf.py index 79e717d..fa55229 100755 --- a/test/test_sat5_0/config/test_create_user_pyconf.py +++ b/test/test_sat5_0/config/test_create_user_pyconf.py @@ -17,7 +17,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import shutil import unittest @@ -122,4 +121,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/config/test_option_copy.py b/test/test_sat5_0/config/test_option_copy.py index 08b4f5d..0a283db 100755 --- a/test/test_sat5_0/config/test_option_copy.py +++ b/test/test_sat5_0/config/test_option_copy.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -56,4 +55,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/config/test_option_edit.py b/test/test_sat5_0/config/test_option_edit.py index b7e2653..5290d3a 100755 --- a/test/test_sat5_0/config/test_option_edit.py +++ b/test/test_sat5_0/config/test_option_edit.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import threading import time import unittest @@ -76,4 +74,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/config/test_option_value.py b/test/test_sat5_0/config/test_option_value.py index 5557fc0..7db29c7 100755 --- a/test/test_sat5_0/config/test_option_value.py +++ b/test/test_sat5_0/config/test_option_value.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import platform import unittest @@ -108,4 +106,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/config/test_option_value_2.py b/test/test_sat5_0/config/test_option_value_2.py index cf7119d..a16623d 100755 --- a/test/test_sat5_0/config/test_option_value_2.py +++ b/test/test_sat5_0/config/test_option_value_2.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import platform import unittest @@ -99,4 +97,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/environ/test_environ.py b/test/test_sat5_0/environ/test_environ.py index 8689574..b2a822c 100755 --- a/test/test_sat5_0/environ/test_environ.py +++ b/test/test_sat5_0/environ/test_environ.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -149,4 +148,3 @@ class TestSource(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/job/test_job.py b/test/test_sat5_0/job/test_job.py index d255fd0..32e9d93 100755 --- a/test/test_sat5_0/job/test_job.py +++ b/test/test_sat5_0/job/test_job.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -125,4 +124,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/jobs/test_jobs.py b/test/test_sat5_0/jobs/test_jobs.py index aa2f1ad..9937f7f 100755 --- a/test/test_sat5_0/jobs/test_jobs.py +++ b/test/test_sat5_0/jobs/test_jobs.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -161,4 +160,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/log/test_launch_browser.py b/test/test_sat5_0/log/test_launch_browser.py index 2a45cd0..9f635fe 100755 --- a/test/test_sat5_0/log/test_launch_browser.py +++ b/test/test_sat5_0/log/test_launch_browser.py @@ -234,7 +234,7 @@ class TestCase(unittest.TestCase): sat.config("-v VARS.user") - nb_logs_t0 = len(os.listdir(sat.cfg.USER.log_dir)) + len(os.listdir(sat.cfg.USER.log_dir)) if os.path.exists(sat.cfg.USER.log_dir + "_save"): shutil.rmtree(sat.cfg.USER.log_dir + "_save") @@ -297,4 +297,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/log/test_launch_browser2.py b/test/test_sat5_0/log/test_launch_browser2.py index 76b7b51..ea65991 100755 --- a/test/test_sat5_0/log/test_launch_browser2.py +++ b/test/test_sat5_0/log/test_launch_browser2.py @@ -17,8 +17,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os -import sys import threading import time import unittest @@ -55,4 +53,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/prepare/test_clean.py b/test/test_sat5_0/prepare/test_clean.py index 3203654..7ef9c5f 100755 --- a/test/test_sat5_0/prepare/test_clean.py +++ b/test/test_sat5_0/prepare/test_clean.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -201,4 +200,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/prepare/test_patch.py b/test/test_sat5_0/prepare/test_patch.py index af7a375..76c0548 100755 --- a/test/test_sat5_0/prepare/test_patch.py +++ b/test/test_sat5_0/prepare/test_patch.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import shutil import unittest @@ -173,4 +172,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/prepare/test_prepare.py b/test/test_sat5_0/prepare/test_prepare.py index 92f5e04..f25c4dd 100755 --- a/test/test_sat5_0/prepare/test_prepare.py +++ b/test/test_sat5_0/prepare/test_prepare.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import shutil import unittest @@ -114,4 +113,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/prepare/test_source.py b/test/test_sat5_0/prepare/test_source.py index ac09fe3..5427732 100755 --- a/test/test_sat5_0/prepare/test_source.py +++ b/test/test_sat5_0/prepare/test_source.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -184,4 +183,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/shell/test_shell.py b/test/test_sat5_0/shell/test_shell.py index 65521be..860af29 100755 --- a/test/test_sat5_0/shell/test_shell.py +++ b/test/test_sat5_0/shell/test_shell.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -90,4 +89,3 @@ class TestCase(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass diff --git a/test/test_sat5_0/test/test_command.py b/test/test_sat5_0/test/test_command.py index 8ea743f..db76f1e 100755 --- a/test/test_sat5_0/test/test_command.py +++ b/test/test_sat5_0/test/test_command.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -import sys import unittest from src.salomeTools import Sat @@ -94,4 +93,3 @@ class TestTest(unittest.TestCase): # test launch if __name__ == "__main__": unittest.main() - pass -- 2.39.2