diff tests/run-tests.py @ 52643:5cc8deb96b48

pyupgrade: modernize calls to superclass methods This is the `legacy` fixer in `pyupgrade`, with the loop yielding the offset of `yield` statements commented out.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 05 Jan 2025 22:23:31 -0500
parents 24ee91ba9aa8
children 70a75d379daf
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/tests/run-tests.py	Sun Jan 05 22:23:31 2025 -0500
@@ -1756,7 +1756,7 @@
         case = kwds.pop('case', [])
         self._case = case
         self._allcases = {x for y in parsettestcases(path) for x in y}
-        super(TTest, self).__init__(path, *args, **kwds)
+        super().__init__(path, *args, **kwds)
         if case:
             casepath = b'#'.join(case)
             self.name = '%s#%s' % (self.name, _bytes2sys(casepath))
@@ -2318,7 +2318,7 @@
     """Holds results when executing via unittest."""
 
     def __init__(self, options, *args, **kwargs):
-        super(TestResult, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
         self._options = options
 
@@ -2484,7 +2484,7 @@
         return accepted
 
     def startTest(self, test):
-        super(TestResult, self).startTest(test)
+        super().startTest(test)
 
         # os.times module computes the user time and system time spent by
         # child's processes along with real elapsed time taken by a process.
@@ -2498,7 +2498,7 @@
             self._firststarttime = test.started_time
 
     def stopTest(self, test, interrupted=False):
-        super(TestResult, self).stopTest(test)
+        super().stopTest(test)
 
         test.stopped_times = os.times()
         stopped_time = time.time()
@@ -2578,7 +2578,7 @@
 
         loop denotes whether to loop over tests forever.
         """
-        super(TestSuite, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
         self._jobs = jobs
         self._whitelist = whitelist
@@ -2805,7 +2805,7 @@
     """Custom unittest test runner that uses appropriate settings."""
 
     def __init__(self, runner, *args, **kwargs):
-        super(TextTestRunner, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
         self._runner = runner