diff options
author | Mats Wichmann <mats@linux.com> | 2019-08-08 15:51:04 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-09-13 14:10:46 (GMT) |
commit | fa1affd9d48c795f911f281b88291a8b8248627c (patch) | |
tree | 22b15f5b58736c1bdcaec554ac309466b2c88f59 /test/Interactive | |
parent | eacd78c2b40a157977d22be5fa195b73e16befdb (diff) | |
download | SCons-fa1affd9d48c795f911f281b88291a8b8248627c.zip SCons-fa1affd9d48c795f911f281b88291a8b8248627c.tar.gz SCons-fa1affd9d48c795f911f281b88291a8b8248627c.tar.bz2 |
test: Fix SyntaxWarnings on escapes in Python strings
This is the remaining batch of SyntaxWarning cleanups in the test/
directory, as flagged by Python 3.8 (now tested with 3.8.0b4). Most of
these are escapes in strings that are not recognized as Python-language
escapes up front, due to the embedded nature of testing - tests write a
string to a file which is actually Python (code or sconscript) which is
later to be executed.
Also changed the timestamp-fallback test to eliminate an imp module
DeprecationWarning: since in all supported Python versions haslib
is stdlib, drop that skip check; the md5 skip check can be a simple
import now.
My test runs with 3.8 show no SyntaxWarnings after this.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Interactive')
-rw-r--r-- | test/Interactive/shell.py | 4 | ||||
-rw-r--r-- | test/Interactive/version.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/Interactive/shell.py b/test/Interactive/shell.py index 40df86f..dd13504 100644 --- a/test/Interactive/shell.py +++ b/test/Interactive/shell.py @@ -89,8 +89,8 @@ if sys.platform == 'win32': else: no_such_error = 'scons: no_such_command: No such file or directory' -expect_stdout = """\ -scons>>> Copy\("foo.out", "foo.in"\) +expect_stdout = \ +r"""scons>>> Copy\("foo.out", "foo.in"\) Touch\("1"\) scons>>> hello from shell_command.py scons>>> ![^"]+ ".*" diff --git a/test/Interactive/version.py b/test/Interactive/version.py index d0f362a..88416ad 100644 --- a/test/Interactive/version.py +++ b/test/Interactive/version.py @@ -40,7 +40,7 @@ test.write('SConstruct', "") # Standard copyright marker is mangled so it doesn't get replaced # by the packaging build. copyright_line = """\ -(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\d, ]+ The SCons Foundation) +(_{2}COPYRIGHT__|Copyright \\(c\\) 2001[-\\d, ]+ The SCons Foundation) """ expect1 = """\ @@ -53,8 +53,8 @@ scons>>> scons>>> """ -test.run(arguments = '-Q --interactive', - stdin = "version\nexit\n") +test.run(arguments='-Q --interactive', + stdin="version\nexit\n") # Windows may or may not print a line for the script version # depending on whether it's invoked through scons.py or scons.bat. |