summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-10-02 05:41:50 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-10-02 05:41:50 (GMT)
commit40cb13a34b33464fa2acd3a1b12e792ca059e67d (patch)
tree88babcfa4cb84f64c5ea11b17823f06295247583
parent6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff)
downloadSCons-40cb13a34b33464fa2acd3a1b12e792ca059e67d.zip
SCons-40cb13a34b33464fa2acd3a1b12e792ca059e67d.tar.gz
SCons-40cb13a34b33464fa2acd3a1b12e792ca059e67d.tar.bz2
Fixed src/engine/SCons/ExecutorTests.py under Python3
-rw-r--r--src/engine/SCons/ExecutorTests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py
index 99c6226..dbfb7d1 100644
--- a/src/engine/SCons/ExecutorTests.py
+++ b/src/engine/SCons/ExecutorTests.py
@@ -53,7 +53,11 @@ class MyAction(object):
def genstring(self, target, source, env):
return ' '.join(['GENSTRING'] + list(map(str, self.actions)) + target + source)
def get_contents(self, target, source, env):
- return ' '.join(self.actions + target + source)
+ return b' '.join(
+ [SCons.Util.to_bytes(aa) for aa in self.actions] +
+ [SCons.Util.to_bytes(tt) for tt in target] +
+ [SCons.Util.to_bytes(ss) for ss in source]
+ )
def get_implicit_deps(self, target, source, env):
return []
@@ -381,14 +385,14 @@ class ExecutorTestCase(unittest.TestCase):
x = SCons.Executor.Executor(MyAction(), env, [], ['t'], ['s'])
c = x.get_contents()
- assert c == 'action1 action2 t s', c
+ assert c == b'action1 action2 t s', c
x = SCons.Executor.Executor(MyAction(actions=['grow']), env, [],
['t'], ['s'])
x.add_pre_action(MyAction(['pre']))
x.add_post_action(MyAction(['post']))
c = x.get_contents()
- assert c == 'pre t sgrow t spost t s', c
+ assert c == b'pre t sgrow t spost t s', c
def test_get_timestamp(self):
"""Test fetching the "timestamp" """