| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
framework.
In order to make the test work, it was necessary to handle the
encoding issue also in the test framework.
Otherwise, though the Latex builder can handle the case, the test
framework chokes on it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the companion to PR #3382. The testing/harness/TestCmdTests.py
unit tests do not currently pass. Note they are not run by the CI
system, or in fact by doing runtests -a, since they're in a directory
that is not searched. After these changes, there are no fails. This is
a test-only change.
The method simple_diff, modeled on difflib functions, is converted to
a generator to match difflib, and now has a doctest as well. This
means calls to it which aren't going to iterate needs to convert the
return with list(), but that just makes usage more consistent, since
the calls to difflib.context_diff and difflib.unified_diff already had
to do so.
Also, the methods that used Google-style docbook markup are changed to
REsT-style markup. Our current doc producer, epydoc, does not understand
the Google style, and we shouldn't mix styles; can convert them all in
bulk later if we switch to Sphinx as the production tool.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Also improve exception handling message in test.subdir()
|
|\
| |
| | |
Fix Issue #3135 - Type Bound procedures in Fortran submodules
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several locations with simple usage of deprecated "imp" module
changed to use "importlib". These match with work in #3159,
but this is not a complete implementation of #3159.
More regex patterns are changed to be raw strings.
Some strings which did not seem appropriate to change to raw
strings (e.g. contain embedded tabs, which Python should honor)
had backslashes escaped to avoid accidental Python interpretation.
Example:
'\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n'
Python 3.8 was Warning \M was an unknown escape.
More open().write(), open().read() style usage changed to use
context managers so the file is closed.
WIP part: even with Python 3.7, the tests which call sconsign.py
fail; oddly they do not fail without the patch to compat.py.
sconsign.py does an import using imp module (which is what
generates the errors) so needs to be updated anyway. It does not
quite fit the "simple usage" pattern - can't do a simple relative
import since sconsign is normally located elsewhere in the tree than
the main scons code body.
With this version of the patch, 700 tests now pass with 3.8, and
Warning messages reduced to 2800 (current master has 200 pass,
9000 warns)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
With runtest now honoring the -j 2 option given to it in
CI setup on Windows, there were some problems where scons-time
tests could try to remove a test directory while some files
in it were still open (these locations were complained about
by Python 3.8 also).
Switch test framework to using mkdtemp also, and to not use
tempfile.template (usage of that and mktemp are long
deprecated)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
In a few places, "is" and "is not" are used to compare with
a string or integer literal. Python 3.8 flags these with
a SyntaxWarning. Changed to == and !=
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
A few tests blew up with exceptions (AttributeError, IndexError) if no
compiler is installed on Windows - from where they are it could possibly
happen on other platforms as well.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
class TestCmd method read() uses a shortcut to return data from
a file, "return open(...).read()". Python 3 warns this is a
resource leak because the file has no chance to be closed with
the open being in the return statement. Split into two lines
and use a context manager (with statement).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
quite some time
|