diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-04-20 06:56:10 -0400 |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-04-20 06:56:10 -0400 |
commit | 870051cadd1c32f41bc3d52feb741201919a11ac (patch) | |
tree | 9ae8e8c70a00a9de2dd37755f7690af833e8f26b /QMTest | |
parent | 86bd16133f12ecdab6fa204d79d7a4c5e52df531 (diff) | |
download | scons-870051cadd1c32f41bc3d52feb741201919a11ac.tar.gz |
Added six module as SCons.compat.six, for python3 port.
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestCmd.py | 4 | ||||
-rw-r--r-- | QMTest/TestCmdTests.py | 50 |
2 files changed, 27 insertions, 27 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index 55c198fd..e6b128bd 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -287,7 +287,7 @@ version. # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. from __future__ import division, print_function -from six import PY3 +from SCons.compat.six import PY3 __author__ = "Steven Knight <knight at baldmt dot com>" __revision__ = "TestCmd.py 1.3.D001 2010/06/03 12:58:27 knight" @@ -685,7 +685,7 @@ if subprocess.mswindows: assert ol is None lpBuffer = ctypes.create_string_buffer(bufSize) bytesRead = DWORD() - bErr = ctypes.windll.kernel32.ReadFile( + bErr = ctypes.windll.kernel32.ReadFile( hFile, lpBuffer, bufSize, ctypes.byref(bytesRead), ol) if not bErr: raise ctypes.WinError() return (0, ctypes.string_at(lpBuffer, bytesRead.value)) diff --git a/QMTest/TestCmdTests.py b/QMTest/TestCmdTests.py index 66115907..a2e70229 100644 --- a/QMTest/TestCmdTests.py +++ b/QMTest/TestCmdTests.py @@ -19,7 +19,7 @@ AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from six import PY3 +from SCons.compat.six import PY3 __author__ = "Steven Knight <knight at baldmt dot com>" __revision__ = "TestCmdTests.py 1.3.D001 2010/06/03 12:58:27 knight" @@ -1870,24 +1870,24 @@ class run_verbose_TestCase(TestCmdTestCase): interpreter = 'python', workdir = '', verbose = 1) - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) o = sys.stdout.getvalue() assert o == '', o e = sys.stderr.getvalue() expect = 'python "%s" "arg1 arg2"\n' % t.script_path assert expect == e, (expect, e) - + testx = TestCmd.TestCmd(program = t.scriptx, workdir = '', verbose = 1) - + sys.stdout = StringIO() sys.stderr = StringIO() - + testx.run(arguments = ['arg1 arg2']) expect = '"%s" "arg1 arg2"\n' % t.scriptx_path o = sys.stdout.getvalue() @@ -1921,10 +1921,10 @@ class run_verbose_TestCase(TestCmdTestCase): interpreter = 'python', workdir = '', verbose = 2) - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) line_fmt = "script: %s: %s: ['arg1 arg2']\n" @@ -1938,14 +1938,14 @@ class run_verbose_TestCase(TestCmdTestCase): expect = 'python "%s" "arg1 arg2"\n' % t.script_path e = sys.stderr.getvalue() assert e == expect, (e, expect) - + testx = TestCmd.TestCmd(program = t.scriptx, workdir = '', verbose = 2) - + sys.stdout = StringIO() sys.stderr = StringIO() - + testx.run(arguments = ['arg1 arg2']) line_fmt = "scriptx.bat: %s: %s: ['arg1 arg2']\n" @@ -1966,10 +1966,10 @@ class run_verbose_TestCase(TestCmdTestCase): interpreter = 'python', workdir = '', verbose = 2) - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) line_fmt = "scriptout: %s: %s: ['arg1 arg2']\n" @@ -1986,10 +1986,10 @@ class run_verbose_TestCase(TestCmdTestCase): interpreter = 'python', workdir = '', verbose = 3) - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) line_fmt = "scriptout: %s: %s: ['arg1 arg2']\n" @@ -2010,10 +2010,10 @@ class run_verbose_TestCase(TestCmdTestCase): test = TestCmd.TestCmd(program = t.script, interpreter = 'python', workdir = '') - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) line_fmt = "script: %s: %s: ['arg1 arg2']\n" @@ -2027,13 +2027,13 @@ class run_verbose_TestCase(TestCmdTestCase): expect = 'python "%s" "arg1 arg2"\n' % t.script_path e = sys.stderr.getvalue() assert e == expect, (e, expect) - + testx = TestCmd.TestCmd(program = t.scriptx, workdir = '') - + sys.stdout = StringIO() sys.stderr = StringIO() - + testx.run(arguments = ['arg1 arg2']) line_fmt = "scriptx.bat: %s: %s: ['arg1 arg2']\n" @@ -2056,24 +2056,24 @@ class run_verbose_TestCase(TestCmdTestCase): interpreter = 'python', workdir = '', verbose = 1) - + sys.stdout = StringIO() sys.stderr = StringIO() - + test.run(arguments = ['arg1 arg2']) o = sys.stdout.getvalue() assert o == '', o e = sys.stderr.getvalue() expect = 'python "%s" "arg1 arg2"\n' % t.script_path assert expect == e, (expect, e) - + testx = TestCmd.TestCmd(program = t.scriptx, workdir = '', verbose = 1) - + sys.stdout = StringIO() sys.stderr = StringIO() - + testx.run(arguments = ['arg1 arg2']) expect = '"%s" "arg1 arg2"\n' % t.scriptx_path o = sys.stdout.getvalue() |