summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/ActionTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/ActionTests.py')
-rw-r--r--src/engine/SCons/ActionTests.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py
index 3aedc25..f872a1d 100644
--- a/src/engine/SCons/ActionTests.py
+++ b/src/engine/SCons/ActionTests.py
@@ -30,9 +30,8 @@ __revision__ = "src/engine/SCons/ActionTests.py __REVISION__ __DATE__ __DEVELOPE
def Func():
pass
-import unittest
-
import sys
+import types
import unittest
import SCons.Action
@@ -46,19 +45,23 @@ class ActionTestCase(unittest.TestCase):
def foo():
pass
a1 = SCons.Action.Action(foo)
- assert isinstance(a1, SCons.Action.FunctionAction)
+ assert isinstance(a1, SCons.Action.FunctionAction), a1
a2 = SCons.Action.Action("string")
- assert isinstance(a2, SCons.Action.CommandAction)
+ assert isinstance(a2, SCons.Action.CommandAction), a2
+
+ if hasattr(types, 'UnicodeType'):
+ exec "a3 = SCons.Action.Action(u'string')"
+ exec "assert isinstance(a3, SCons.Action.CommandAction), a3"
- a3 = SCons.Action.Action(["x", a2, "y"])
- assert isinstance(a3, SCons.Action.ListAction)
+ a4 = SCons.Action.Action(["x", a2, "y"])
+ assert isinstance(a4, SCons.Action.ListAction), a4
- a4 = SCons.Action.Action(1)
- assert a4 is None, a4
+ a5 = SCons.Action.Action(1)
+ assert a5 is None, a5
- a5 = SCons.Action.Action(a1)
- assert a5 is a1
+ a6 = SCons.Action.Action(a1)
+ assert a6 is a1
class ActionBaseTestCase(unittest.TestCase):