diff options
author | Mats Wichmann <mats@linux.com> | 2022-05-30 18:28:57 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2022-05-30 18:33:16 (GMT) |
commit | 150197f2273fa639aa4815a68f9bcd38d3068a8d (patch) | |
tree | db13d63507bc94b18732a214560f2c13fae4a8a2 /SCons/Scanner | |
parent | f230fd34892754bca67742e93aae471fd58133ec (diff) | |
download | SCons-150197f2273fa639aa4815a68f9bcd38d3068a8d.zip SCons-150197f2273fa639aa4815a68f9bcd38d3068a8d.tar.gz SCons-150197f2273fa639aa4815a68f9bcd38d3068a8d.tar.bz2 |
Fix some Py 3.11 depr warns in tests
A couple of unittest methods that a few SCons tests use have
been marked deprecated in Python 3.11, with replacements provided.
Partial fix for #4162, do not close just off this PR.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Scanner')
-rw-r--r-- | SCons/Scanner/ScannerTests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SCons/Scanner/ScannerTests.py b/SCons/Scanner/ScannerTests.py index 68332a0..b9cb209 100644 --- a/SCons/Scanner/ScannerTests.py +++ b/SCons/Scanner/ScannerTests.py @@ -621,7 +621,9 @@ def suite(): ClassicCPPTestCase, ] for tclass in tclasses: - names = unittest.getTestCaseNames(tclass, 'test_') + loader = unittest.TestLoader() + loader.testMethodPrefix = 'test_' + names = loader.getTestCaseNames(tclass) suite.addTests(list(map(tclass, names))) return suite |