summaryrefslogtreecommitdiffstats
path: root/testing/framework/TestCommonTests.py
Commit message (Collapse)AuthorAgeFilesLines
* Polish test skipping in a couple of FW tests [skip appveyor]Mats Wichmann2022-11-291-9/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* [ci skip] fix sider complaintsWilliam Deegan2022-11-291-4/+5
|
* Fix remaining tests failing on win32William Deegan2022-11-291-35/+10
|
* Fix one Windows-ism in TestCommonTests [skip appveyor]Mats Wichmann2022-11-281-2/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Updated TestCommonTests for Py 3.11 [skip appveyor]Mats Wichmann2022-11-271-15/+15
| | | | | | | | Changed the regex for the explicitly generated exception so it also works on Python 3.11+ with the new 'helpful errors' which can add an extra line to the output trying to show the error (thanks to Bill Deegan) Signed-off-by: Mats Wichmann <mats@linux.com>
* Use f-strings in framework and framework testsMats Wichmann2022-11-241-9/+9
| | | | | | | | | This is a mostly tool-based conversion (a couple added by hand), and other changes were not made, to try to keep the diff manageable. Adds a GitHub Action to run framework tests if framework changes. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix one test in TestCommonTests [ci skip]Mats Wichmann2022-11-221-3/+4
| | | | | | | | | The framework tests have been failing one test in the Common set, partly due to a missing None in the expected text for the exception test, and partly due to a change in SCons code that appears in a traceback that had been captured, but not properly escaped. Signed-off-by: Mats Wichmann <mats@linux.com>
* Maintenance: fix some fiddly checker errorsMats Wichmann2022-11-051-8/+8
| | | | | | | | | | | A rawstring to avoid an invalid escape warning. A couple of instances where code is comparing type () calls, advice is to is isinstance() instead. Missing backslashes on escapes in framewok test (rarely run) Updating expected traceback msg in framework test after the code which forces the exception changed in a previous revision. Signed-off-by: Mats Wichmann <mats@linux.com>
* Test framework improvementsMats Wichmann2022-08-031-14/+8
| | | | | | | | | Replaces one custom function with one from Python stdlib (textwrap.dedent) Fixes one test case that did not check for None Changes "fill line with a character" implementations to use Python string formatting, which has this capability. Signed-off-by: Mats Wichmann <mats@linux.com>
* [Test] drop old exception msgsMats Wichmann2022-07-081-1/+1
| | | | | | | | | Minor maintenance to drop a regex group in a few tests (including in a test framework test) which allowed for two different exception messages: one belongs to very old Pythons which are no longer supported by SCons. Signed-off-by: Mats Wichmann <mats@linux.com>
* Test Framework tests: Windows fixesMats Wichmann2022-06-141-21/+21
| | | | | | | | Where string pasting is done using test or interpreter paths, make sure they're pasted as raw strings to avoid problems on the Windows platform, where the likely presence of '\Users` is likely to cause a unicode error. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix some Py 3.11 depr warns in testsMats Wichmann2022-05-301-2/+4
| | | | | | | | | 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>
* Test harness add a from_fw to skip callsMats Wichmann2021-04-131-17/+17
| | | | | | | | | | | | | | | | | | Main functional change is a new kwarg to skip_test() to allow calls from inside the framework to skip an additional line of traceback in the skip output - i.e. don't just skip the entry for skip_test, but also the function in the fw that called it. Other functional change is for the try block in skip_if_not_msvc() (which is one of the internal callers of skip_test() mentioned for the other change) to catch Exception, thus avoiding system-existing exceptions that were caught by the existing bare except, which caused the skip to not actually skip. The remainder of the patch is docstring reformatting, some minor code reformats, top-of-file license blocks, etc. Signed-off-by: Mats Wichmann <mats@linux.com>
* Run autoflake on codeMats Wichmann2020-09-211-2/+0
| | | | | | | | | | Eliminate unneeded imports, and a few unneeded statements - usually "pass" where it is not syntactically needed. A couple of import try blocks were eliminated or changed when they're "cannot happen" due to current floor Python version. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fixed Docbook Tool and updated its tests.Dirk Baechle2020-06-211-0/+52
|
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-201-5/+2
| | | | | | | | | | | | | | | A couple of minor reformats along the way, most prominently, in tests, if being edited anyway, make sure the docstring most tests have is actually the docstring (sometimes the __revision__ line came before, which makes the string not be the docstring). Snuck in some minor framework changes that were orphaned when another draft PR was not needed: this almost all docstring changes, the functional part is using casefold instead of lower in a match func - a slightly better approach which is now possible that Py2 compatibility is not needed. Signed-off-by: Mats Wichmann <mats@linux.com>
* Update TestCommonTests.py to work with py35+ changesWilliam Deegan2020-02-181-23/+25
|
* add test cases to exhibit bugs in must_[not_]contain()Paweł Tomulik2018-10-051-2/+54
|
* move test files from QMTest to testing/framework. QMtest hasn't been used in ↵William Deegan2018-04-301-0/+2340
quite some time