From 67cbcb1fabc677b2fcbac4187992d43c51cf3874 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 18 Apr 2017 21:11:17 -0700 Subject: py2/3 - syntax for wrong number of arguments to functions changes for py3, added to valid output --- test/Subst/TypeError.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/Subst/TypeError.py b/test/Subst/TypeError.py index 371ceff..628db2f 100644 --- a/test/Subst/TypeError.py +++ b/test/Subst/TypeError.py @@ -58,9 +58,7 @@ expect = expect_build % (r' \[foo\.bar\]', r'\$\{NONE\[0\]\}') test.run(status=2, stderr=expect) - - -expect_build = r"""scons: \*\*\*%s TypeError `(not enough arguments; expected 3, got 1|func\(\) takes exactly 3 arguments \(1 given\))' trying to evaluate `%s' +expect_build = r"""scons: \*\*\*%s TypeError `(not enough arguments; expected 3, got 1|func\(\) takes exactly 3 arguments \(1 given\)|func\(\) missing 2 required positional arguments: 'b' and 'c')' trying to evaluate `%s' """ expect_read = "\n" + expect_build + TestSCons.file_expr -- cgit v0.12 From aae1dc7ebafa24cc9ac6fef7db00dbc6ec7633a1 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 18 Apr 2017 21:16:46 -0700 Subject: py2/3 no auto stringification for None in py3 --- test/GetBuildFailures/parallel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py index ee0e831..f9503e0 100644 --- a/test/GetBuildFailures/parallel.py +++ b/test/GetBuildFailures/parallel.py @@ -80,7 +80,7 @@ Command('f6', 'f6.in', r'@%(_python_)s mypass.py f5 - $TARGET $SOURCE') def print_build_failures(): from SCons.Script import GetBuildFailures - for bf in sorted(GetBuildFailures(), key=lambda t: t.filename): + for bf in sorted(GetBuildFailures(), key=lambda t: t.filename or 'None'): print("%%s failed: %%s" %% (bf.node, bf.errstr)) import atexit -- cgit v0.12 From d13cd11ef106fd6fbdbf007257b1da2dacf71d0e Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 18 Apr 2017 21:17:38 -0700 Subject: py2/3 no auto stringification for None in py3 --- test/GetBuildFailures/option-k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/GetBuildFailures/option-k.py b/test/GetBuildFailures/option-k.py index 0ff22e6..12ae07b 100644 --- a/test/GetBuildFailures/option-k.py +++ b/test/GetBuildFailures/option-k.py @@ -64,7 +64,7 @@ Command('f6', 'f6.in', r'@%(_python_)s mypass.py f5 - $TARGET $SOURCE') def print_build_failures(): from SCons.Script import GetBuildFailures - for bf in sorted(GetBuildFailures(), key=lambda a: a.filename): + for bf in sorted(GetBuildFailures(), key=lambda a: a.filename or 'None'): print("%%s failed: %%s" %% (bf.node, bf.errstr)) import atexit -- cgit v0.12