summaryrefslogtreecommitdiffstats
path: root/test/option
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-08-27 19:23:59 (GMT)
committerSteven Knight <knight@baldmt.com>2010-08-27 19:23:59 (GMT)
commit017f807a0745357b4b9b16c52738ef5949f84b90 (patch)
treef8592e5ada48a821e83ad3df2a38e28baa4c2c88 /test/option
parent06a72d788b7695cfc6a6e53e9d3808a12d929b9d (diff)
downloadSCons-017f807a0745357b4b9b16c52738ef5949f84b90.zip
SCons-017f807a0745357b4b9b16c52738ef5949f84b90.tar.gz
SCons-017f807a0745357b4b9b16c52738ef5949f84b90.tar.bz2
Python 2.7 fixes in four tests.
Diffstat (limited to 'test/option')
-rw-r--r--test/option/profile.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/option/profile.py b/test/option/profile.py
index 5a4b392..d53c690 100644
--- a/test/option/profile.py
+++ b/test/option/profile.py
@@ -25,16 +25,18 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
try:
- from io import StringIO as _StringIO
+ import io
+ _StringIO = io.StringIO
except (ImportError, AttributeError):
# Pre-2.6 Python has no "io" module.
exec('from cStringIO import StringIO')
else:
- # TODO(2.6): The 2.6 io.StringIO.write() method requires unicode strings.
- # This subclass can be removed when we drop support for Python 2.6.
+ # TODO(2.6): In 2.6 and beyond, the io.StringIO.write() method
+ # requires unicode strings. This subclass can probably be removed
+ # when we drop support for Python 2.6.
class StringIO(_StringIO):
def write(self, s):
- super(_StringIO, self).write(unicode(s))
+ _StringIO.write(self, unicode(s))
import TestSCons