From e0c8940559310988fb150b0ee8648da7200a1572 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 16 Jul 2018 10:27:22 -0400 Subject: Fix src/engine/SCons/ActionTests.py. Needed per python version valid strings to compare against for 3.7 --- src/engine/SCons/ActionTests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index ed88f72..b9cc00b 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -1525,6 +1525,7 @@ class CommandGeneratorActionTestCase(unittest.TestCase): (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), } meth_matches = [ @@ -1702,12 +1703,15 @@ class FunctionActionTestCase(unittest.TestCase): (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + } meth_matches = { (2, 7): bytearray(b'1, 1, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'1, 1, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 7): bytearray(b'1, 1, 0, 0,(),(),(d\x00S\x00),(),()'), } def factory(act, **kw): @@ -1951,6 +1955,7 @@ class LazyActionTestCase(unittest.TestCase): (2, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 5): bytearray(b'0, 0, 0, 0,(),(),(d\x00\x00S),(),()'), (3, 6): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), + (3, 7): bytearray(b'0, 0, 0, 0,(),(),(d\x00S\x00),(),()'), } meth_matches = [ @@ -2008,6 +2013,8 @@ class ActionCallerTestCase(unittest.TestCase): (2, 7): b'd\x00\x00S', (3, 5): b'd\x00\x00S', (3, 6): b'd\x00S\x00', + (3, 7): b'd\x00S\x00', + } af = SCons.Action.ActionFactory(GlobalFunc, strfunc) @@ -2206,6 +2213,7 @@ class ObjectContentsTestCase(unittest.TestCase): (2, 7): bytearray(b'3, 3, 0, 0,(),(),(|\x00\x00S),(),()'), (3, 5): bytearray(b'3, 3, 0, 0,(),(),(|\x00\x00S),(),()'), (3, 6): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), + (3, 7): bytearray(b'3, 3, 0, 0,(),(),(|\x00S\x00),(),()'), } c = SCons.Action._function_contents(func1) @@ -2229,6 +2237,8 @@ class ObjectContentsTestCase(unittest.TestCase): b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01\x00|\x00\x00_\x00\x00d\x02\x00|\x00\x00_\x01\x00d\x00\x00S),(),(),2, 2, 0, 0,(),(),(d\x00\x00S),(),()}}{{{a=a,b=b}}}"), (3, 6): bytearray( b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}"), + (3, 7): bytearray( + b"{TestClass:__main__}[[[(, ()), [(, (,))]]]]{{1, 1, 0, 0,(a,b),(a,b),(d\x01|\x00_\x00d\x02|\x00_\x01d\x00S\x00),(),(),2, 2, 0, 0,(),(),(d\x00S\x00),(),()}}{{{a=a,b=b}}}"), } assert c == expected[sys.version_info[:2]], "Got\n" + repr(c) + "\nExpected \n" + "\n" + repr( @@ -2245,6 +2255,7 @@ class ObjectContentsTestCase(unittest.TestCase): (2, 7): bytearray(b'0, 0, 0, 0,(N.),(),(d\x00\x00GHd\x01\x00S)'), (3, 5): bytearray(b'0, 0, 0, 0,(N.),(print),(e\x00\x00d\x00\x00\x83\x01\x00\x01d\x01\x00S)'), (3, 6): bytearray(b'0, 0, 0, 0,(N.),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), + (3, 7): bytearray(b'0, 0, 0, 0,(N.),(print),(e\x00d\x00\x83\x01\x01\x00d\x01S\x00)'), } assert c == expected[sys.version_info[:2]], "Got\n" + repr(c) + "\nExpected \n" + "\n" + expected[ -- cgit v0.12