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/Java | |
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/Java')
-rw-r--r-- | test/Java/JARFLAGS.py | 6 | ||||
-rw-r--r-- | test/Java/JAVABOOTCLASSPATH.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/Java/JARFLAGS.py b/test/Java/JARFLAGS.py index 39a0a6c..6983bf7 100644 --- a/test/Java/JARFLAGS.py +++ b/test/Java/JARFLAGS.py @@ -59,10 +59,10 @@ public class Example1 """) expect = test.wrap_stdout("""\ -javac -d classes -sourcepath src src.Example1\.java -jar cvf test.jar -C classes src.Example1\.class +javac -d classes -sourcepath src src.Example1\\.java +jar cvf test.jar -C classes src.Example1\\.class .* -adding: src.Example1\.class.* +adding: src.Example1\\.class.* """ % locals()) diff --git a/test/Java/JAVABOOTCLASSPATH.py b/test/Java/JAVABOOTCLASSPATH.py index 196cc54..8aaf869 100644 --- a/test/Java/JAVABOOTCLASSPATH.py +++ b/test/Java/JAVABOOTCLASSPATH.py @@ -84,8 +84,8 @@ public class Example2 bootclasspath = os.pathsep.join(['dir1', 'dir2']) expect = """\ -javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example1\.java -javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example2\.java +javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example1\\.java +javac -bootclasspath %(bootclasspath)s -d class -sourcepath com com.Example2\\.java """ % locals() test.run(arguments = '-Q -n .', stdout = expect, match=TestSCons.match_re) |