summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-04-07 15:29:39 (GMT)
committerSteven Knight <knight@baldmt.com>2010-04-07 15:29:39 (GMT)
commitca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42 (patch)
treeeb60dd8251a7fd064aa255309df2056dbf49a258 /test
parent32d7c315d62846ea8febadcbb2c60cf9e3382cbf (diff)
downloadSCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.zip
SCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.tar.gz
SCons-ca29ee5e30d4d4ad60d51f95e4ac61eee7e5cd42.tar.bz2
Issue 2334: Use compatibility versions of collections.User{Dict,List,String}
instead of the deprecated User{Dict,List,String} modules. The two test scripts that use User{List,String} fall back on ImportError by hand.
Diffstat (limited to 'test')
-rw-r--r--test/SConscript/SConscript.py7
-rw-r--r--test/subclassing.py5
2 files changed, 9 insertions, 3 deletions
diff --git a/test/SConscript/SConscript.py b/test/SConscript/SConscript.py
index 5bd49f3..177b5df 100644
--- a/test/SConscript/SConscript.py
+++ b/test/SConscript/SConscript.py
@@ -71,10 +71,13 @@ assert foo == "subdir/SConscript foo"
SConscript('SConscript5')
-import UserList
+try:
+ from io import UserList
+except ImportError:
+ from UserList import UserList
x7 = "SConstruct x7"
x8 = "SConstruct x8"
-x9 = SConscript('SConscript6', UserList.UserList(["x7", "x8"]))
+x9 = SConscript('SConscript6', UserList(["x7", "x8"]))
assert x9 == "SConscript6 x9", x9
SConscript('SConscript7')
diff --git a/test/subclassing.py b/test/subclassing.py
index 655de51..fc00349 100644
--- a/test/subclassing.py
+++ b/test/subclassing.py
@@ -51,7 +51,10 @@ class my_Environment(Environment):
env = my_Environment()
env.Command('f0.out', 'f0.in', copy_action)
-from UserString import UserString
+try:
+ from io import UserString
+except ImportError:
+ from UserString import UserString
try:
class mystr(str):
pass