summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-29 14:21:04 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-03-29 14:21:04 (GMT)
commit238a7bdb01614c5d6b81fdebadd069bc40a61d23 (patch)
treede2e680e944eb3c51fe1ba93714beba4605b18f4 /test
parent7adebb06bb6055345cc584377159d8052ea39e1b (diff)
downloadSCons-238a7bdb01614c5d6b81fdebadd069bc40a61d23.zip
SCons-238a7bdb01614c5d6b81fdebadd069bc40a61d23.tar.gz
SCons-238a7bdb01614c5d6b81fdebadd069bc40a61d23.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
The 'buffer' fixer simply replaces 'buffer( ... )' with 'memoryview( ... )', which is incorrect for our cases, so these changes had to be done by hand and a forward-compatibility class added. The 'xrange' fixer was applied. Manual changes were minimal: a few case in test strings and one use of 'range' as an identifer in the same scope as where 'xrange' was converted to 'range'. The "sets15" compat function, which provided backward compatibility for Python versions prior to 2.2, was removed as no longer needed.
Diffstat (limited to 'test')
-rw-r--r--test/Batch/action-changed.py2
-rw-r--r--test/KeyboardInterrupt.py2
-rw-r--r--test/SWIG/build-dir.py2
-rw-r--r--test/option/md5-chunksize.py4
-rw-r--r--test/scons-time/func/chdir.py2
-rw-r--r--test/scons-time/func/glob.py2
-rw-r--r--test/scons-time/func/prefix.py4
-rw-r--r--test/scons-time/func/tail.py2
-rw-r--r--test/scons-time/mem/chdir.py2
-rw-r--r--test/scons-time/mem/glob.py2
-rw-r--r--test/scons-time/mem/prefix.py2
-rw-r--r--test/scons-time/mem/tail.py2
-rw-r--r--test/scons-time/obj/chdir.py2
-rw-r--r--test/scons-time/obj/glob.py2
-rw-r--r--test/scons-time/obj/prefix.py2
-rw-r--r--test/scons-time/obj/tail.py2
-rw-r--r--test/scons-time/time/chdir.py2
-rw-r--r--test/scons-time/time/empty.py2
-rw-r--r--test/scons-time/time/glob.py2
-rw-r--r--test/scons-time/time/no-result.py2
-rw-r--r--test/scons-time/time/prefix.py2
-rw-r--r--test/scons-time/time/tail.py2
22 files changed, 24 insertions, 24 deletions
diff --git a/test/Batch/action-changed.py b/test/Batch/action-changed.py
index 886a692..dc2805a 100644
--- a/test/Batch/action-changed.py
+++ b/test/Batch/action-changed.py
@@ -43,7 +43,7 @@ import sys
sep = sys.argv.index('--')
targets = sys.argv[1:sep]
sources = sys.argv[sep+1:]
-for i in xrange(len(targets)):
+for i in range(len(targets)):
t = targets[i]
s = sources[i]
fp = open(t, 'wb')
diff --git a/test/KeyboardInterrupt.py b/test/KeyboardInterrupt.py
index d0f1207..bcb576c 100644
--- a/test/KeyboardInterrupt.py
+++ b/test/KeyboardInterrupt.py
@@ -76,7 +76,7 @@ else:
all = []
-for i in xrange(40):
+for i in range(40):
all.extend(Object('toto%5d' % i, 'toto.c'))
all.extend(Command( 'broken', 'toto.c', explode))
diff --git a/test/SWIG/build-dir.py b/test/SWIG/build-dir.py
index d5b5236..a9d7cb2 100644
--- a/test/SWIG/build-dir.py
+++ b/test/SWIG/build-dir.py
@@ -136,7 +136,7 @@ public:
%pythoncode %{
def __iter__(self):
- for i in xrange(len(self)):
+ for i in range(len(self)):
yield self[i]
%}
}
diff --git a/test/option/md5-chunksize.py b/test/option/md5-chunksize.py
index acd3492..375208d 100644
--- a/test/option/md5-chunksize.py
+++ b/test/option/md5-chunksize.py
@@ -47,8 +47,8 @@ f2 = env.B(target = 'f2.out', source = 'f2.in')
Requires(f2, f1)
""" % locals())
-test.write('f1.in', str(range(10)))
-test.write('f2.in', str(range(100000)))
+test.write('f1.in', str(list(range(10))))
+test.write('f2.in', str(list(range(100000))))
expected_stdout = test.wrap_stdout("""\
%(_python_)s build.py f1.out f1.in
diff --git a/test/scons-time/func/chdir.py b/test/scons-time/func/chdir.py
index 0ce4340..1aea7ad 100644
--- a/test/scons-time/func/chdir.py
+++ b/test/scons-time/func/chdir.py
@@ -48,7 +48,7 @@ def _main():
"""
expect = []
-for i in xrange(9):
+for i in range(9):
i = str(i)
test.subdir(i)
test.profile_data('profs/foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
diff --git a/test/scons-time/func/glob.py b/test/scons-time/func/glob.py
index d3fd960..6240404 100644
--- a/test/scons-time/func/glob.py
+++ b/test/scons-time/func/glob.py
@@ -43,7 +43,7 @@ def _main():
"""
expect = []
-for i in xrange(9):
+for i in range(9):
test.subdir(str(i))
test.profile_data('foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
expect.append((r'\d.\d\d\d %s/prof\.py:1\(_main\)' + '\n') % i)
diff --git a/test/scons-time/func/prefix.py b/test/scons-time/func/prefix.py
index fe3618f..67a0c6b 100644
--- a/test/scons-time/func/prefix.py
+++ b/test/scons-time/func/prefix.py
@@ -47,11 +47,11 @@ def _main():
foo_lines = []
bar_lines = []
-for i in xrange(2):
+for i in range(2):
test.profile_data('foo-%s.prof' % i, 'prof.py', '_main', input)
foo_lines.append(r'\d.\d\d\d prof\.py:1\(_main\)' + '\n')
-for i in xrange(4):
+for i in range(4):
test.profile_data('bar-%s.prof' % i, 'prof.py', '_main', input)
bar_lines.append(r'\d.\d\d\d prof\.py:1\(_main\)' + '\n')
diff --git a/test/scons-time/func/tail.py b/test/scons-time/func/tail.py
index 91fa6c8..afd3f83 100644
--- a/test/scons-time/func/tail.py
+++ b/test/scons-time/func/tail.py
@@ -44,7 +44,7 @@ def _main():
"""
expect = []
-for i in xrange(9):
+for i in range(9):
test.subdir(str(i))
test.profile_data('foo-%s.prof' % i, '%s/prof.py' % i, '_main', input)
expect.append((r'\d.\d\d\d %s/prof\.py:1\(_main\)' + '\n') % i)
diff --git a/test/scons-time/mem/chdir.py b/test/scons-time/mem/chdir.py
index 52dbd2c..5bf618c 100644
--- a/test/scons-time/mem/chdir.py
+++ b/test/scons-time/mem/chdir.py
@@ -43,7 +43,7 @@ lines = [
line_fmt = ' 1000 2000 3000 4000 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = os.path.join('logs', 'foo-%s.log' % i)
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/mem/glob.py b/test/scons-time/mem/glob.py
index 04d8b09..820021e 100644
--- a/test/scons-time/mem/glob.py
+++ b/test/scons-time/mem/glob.py
@@ -38,7 +38,7 @@ lines = [
line_fmt = ' 1000 2000 3000 4000 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/mem/prefix.py b/test/scons-time/mem/prefix.py
index 5e64dad..faca54d 100644
--- a/test/scons-time/mem/prefix.py
+++ b/test/scons-time/mem/prefix.py
@@ -43,7 +43,7 @@ line_fmt = ' 1000 2000 3000 4000 %s\n'
foo_lines = [ header ]
bar_lines = [ header ]
-for i in xrange(3):
+for i in range(3):
logfile_name = os.path.join('foo-%s.log' % i)
test.fake_logfile(logfile_name)
foo_lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/mem/tail.py b/test/scons-time/mem/tail.py
index 19f4036..cd00274 100644
--- a/test/scons-time/mem/tail.py
+++ b/test/scons-time/mem/tail.py
@@ -40,7 +40,7 @@ lines = []
line_fmt = ' 1000 2000 3000 4000 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/obj/chdir.py b/test/scons-time/obj/chdir.py
index 5b7fe22..4b77f8a 100644
--- a/test/scons-time/obj/chdir.py
+++ b/test/scons-time/obj/chdir.py
@@ -43,7 +43,7 @@ lines = [
line_fmt = ' 1101%(i)s 1102%(i)s 1103%(i)s 1104%(i)s %(logfile_name)s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = os.path.join('logs', 'foo-%s.log' % i)
test.fake_logfile(logfile_name, i)
lines.append(line_fmt % locals())
diff --git a/test/scons-time/obj/glob.py b/test/scons-time/obj/glob.py
index 07ccccc..2105355 100644
--- a/test/scons-time/obj/glob.py
+++ b/test/scons-time/obj/glob.py
@@ -38,7 +38,7 @@ lines = [
line_fmt = ' 601%(i)s 602%(i)s 603%(i)s 604%(i)s %(logfile_name)s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name, i)
lines.append(line_fmt % locals())
diff --git a/test/scons-time/obj/prefix.py b/test/scons-time/obj/prefix.py
index e669cf2..0bee5f7 100644
--- a/test/scons-time/obj/prefix.py
+++ b/test/scons-time/obj/prefix.py
@@ -43,7 +43,7 @@ line_fmt = ' 11010 11020 11030 11040 %s\n'
foo_lines = [ header ]
bar_lines = [ header ]
-for i in xrange(3):
+for i in range(3):
logfile_name = os.path.join('foo-%s.log' % i)
test.fake_logfile(logfile_name)
foo_lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/obj/tail.py b/test/scons-time/obj/tail.py
index 9049c89..341a905 100644
--- a/test/scons-time/obj/tail.py
+++ b/test/scons-time/obj/tail.py
@@ -40,7 +40,7 @@ lines = []
line_fmt = ' 1501%(i)s 1502%(i)s 1503%(i)s 1504%(i)s %(logfile_name)s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name, i)
lines.append(line_fmt % locals())
diff --git a/test/scons-time/time/chdir.py b/test/scons-time/time/chdir.py
index ef340a1..762de75 100644
--- a/test/scons-time/time/chdir.py
+++ b/test/scons-time/time/chdir.py
@@ -43,7 +43,7 @@ lines = [
line_fmt = ' 11.123456 22.234567 33.345678 44.456789 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = os.path.join('logs', 'foo-%s.log' % i)
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/time/empty.py b/test/scons-time/time/empty.py
index d73db79..a59a014 100644
--- a/test/scons-time/time/empty.py
+++ b/test/scons-time/time/empty.py
@@ -41,7 +41,7 @@ lines = []
line_fmt = ' 11.123456 22.234567 33.345678 44.456789 %s\n'
empty_fmt = ' %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s-0.log' % i
if i == 5:
test.write(test.workpath(logfile_name), "")
diff --git a/test/scons-time/time/glob.py b/test/scons-time/time/glob.py
index d202e61..1a76d9f 100644
--- a/test/scons-time/time/glob.py
+++ b/test/scons-time/time/glob.py
@@ -38,7 +38,7 @@ lines = [
line_fmt = ' 11.123456 22.234567 33.345678 44.456789 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/time/no-result.py b/test/scons-time/time/no-result.py
index baf06d7..fbd2de9 100644
--- a/test/scons-time/time/no-result.py
+++ b/test/scons-time/time/no-result.py
@@ -49,7 +49,7 @@ line_fmt = "%s 11.123456\n"
lines = []
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s-0.log' % i
if i == 5:
test.write(test.workpath(logfile_name), "NO RESULTS HERE!\n")
diff --git a/test/scons-time/time/prefix.py b/test/scons-time/time/prefix.py
index d12287d..00a1f52 100644
--- a/test/scons-time/time/prefix.py
+++ b/test/scons-time/time/prefix.py
@@ -43,7 +43,7 @@ line_fmt = ' 11.123456 22.234567 33.345678 44.456789 %s\n'
foo_lines = [ header ]
bar_lines = [ header ]
-for i in xrange(3):
+for i in range(3):
logfile_name = os.path.join('foo-%s.log' % i)
test.fake_logfile(logfile_name)
foo_lines.append(line_fmt % logfile_name)
diff --git a/test/scons-time/time/tail.py b/test/scons-time/time/tail.py
index 372f785..c89f904 100644
--- a/test/scons-time/time/tail.py
+++ b/test/scons-time/time/tail.py
@@ -40,7 +40,7 @@ lines = []
line_fmt = ' 11.123456 22.234567 33.345678 44.456789 %s\n'
-for i in xrange(9):
+for i in range(9):
logfile_name = 'foo-%s.log' % i
test.fake_logfile(logfile_name)
lines.append(line_fmt % logfile_name)