diff options
author | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:25:57 +0300 |
---|---|---|
committer | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:25:57 +0300 |
commit | 2342e61cb53824e2dcd6324e3d108500d61ffee2 (patch) | |
tree | 2899ebce2effcb9e3bd5622fbdb371f75feadd59 /sources/pyside2/tests | |
parent | e31990ada911989dbcef3d4833f77dd054030e2c (diff) | |
parent | b9cf35960e98adf9af7c4ea2cc09bfbdadf4f71f (diff) |
Merge tag 'v5.15.8-lts' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Qt For Python Release 5.15.8
Change-Id: Ib92716482ef78eead1859f4f0c980b308a6e5846
Diffstat (limited to 'sources/pyside2/tests')
-rw-r--r-- | sources/pyside2/tests/QtWidgets/signature_test.py | 5 | ||||
-rw-r--r-- | sources/pyside2/tests/registry/scrape_testresults.py | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/sources/pyside2/tests/QtWidgets/signature_test.py b/sources/pyside2/tests/QtWidgets/signature_test.py index 57fcf3874..cacb576d7 100644 --- a/sources/pyside2/tests/QtWidgets/signature_test.py +++ b/sources/pyside2/tests/QtWidgets/signature_test.py @@ -65,8 +65,9 @@ class PySideSignatureTest(unittest.TestCase): for thing in obj.__signature__: self.assertEqual(type(thing), inspect.Signature) sm = PySide2.QtWidgets.QApplication.__dict__["palette"] - self.assertFalse(callable(sm)) - self.assertEqual(sm.__func__, obj) + # PYSIDE-1436: staticmethod is a callable since Python 3.10 + # Instead of checking callable(sm), we check the type: + self.assertEqual(type(sm), staticmethod) self.assertTrue(hasattr(sm, "__signature__") and sm.__signature__ is not None) diff --git a/sources/pyside2/tests/registry/scrape_testresults.py b/sources/pyside2/tests/registry/scrape_testresults.py index c5c0e8689..56bb8058c 100644 --- a/sources/pyside2/tests/registry/scrape_testresults.py +++ b/sources/pyside2/tests/registry/scrape_testresults.py @@ -188,7 +188,7 @@ def write_data(name, text): lines.pop() text = "\n".join(lines) + "\n" modname = re.search(r"'(..*?)'", text).group(1) - fn = os.path.join(test_path, f"{ts}-{name}-{modname}.py") + fn = os.path.join(test_path, "{}-{}-{}.py".format(ts, name, modname)) if os.path.exists(fn): # do not change the file, we want to skip it return @@ -321,31 +321,31 @@ def get_test_results(starturl): minutes, seconds = divmod(remainder, 60) runtime_formatted = '%d:%02d:%06.3f' % (hours, minutes, seconds) - print(f"Run time: {runtime_formatted}s") + print("Run time: {}s".format(runtime_formatted)) if ok: found = eval_data() - print(f"Successful scan, {found} new files.") + print("Successful scan, {} new files.".format(found)) if found: print("Please check if a git push is necessary.") if __name__ == "__main__": parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, - usage=dedent(f"""\ - {os.path.basename(my_name)} [-h] scan + usage=dedent("""\ + {} [-h] scan - Scan the COIN testresults website for embedded exists_{{platf}}_{{version}}_ci.py files. + Scan the COIN testresults website for embedded exists_{{}}_{{}}_ci.py files. Warning: On the first call, this script may take almost 30 minutes to run. Subsequent calls are *much* faster due to caching. - {os.path.basename(my_name)} [-h] eval + {} [-h] eval Enforces evaluation when a scan did not complete yet. For more information, see the file sources/shiboken2/libshiboken/signature_doc.rst - """)) + """.format(os.path.basename(my_name), platf, version, os.path.basename(my_name))) subparsers = parser.add_subparsers(dest="command", metavar="", title="required argument") # create the parser for the "scan" command parser_scan = subparsers.add_parser("scan", help="run the scan") |