aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Severinsson <jon@severinsson.net>2013-04-13 01:39:43 +0200
committerKenneth Graunke <kenneth@whitecape.org>2013-04-16 21:05:05 -0700
commit309b5e47025587c54dfdcfc9d17a97ba25e81ab1 (patch)
tree97e1b004edc2abb1c15ce384f63372ce7033349d
parentf6befdb5f9d736287784b894b259bd5dc3d07fc4 (diff)
framework: Fix "inconsistent use of tabs and spaces in indentation" warnings.
These warnings have become fatal errors in Python 3.x. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--framework/core.py40
-rw-r--r--tests/all.tests2
-rw-r--r--tests/gtf.tests10
3 files changed, 26 insertions, 26 deletions
diff --git a/framework/core.py b/framework/core.py
index 08f442f2..ed6f15ee 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -282,23 +282,23 @@ class TestrunResult:
'''
Reapair JSON file if necessary
- If the JSON file is not closed properly, perhaps due a system
- crash during a test run, then the JSON is repaired by
- discarding the trailing, incomplete item and appending braces
- to the file to close the JSON object.
-
- The repair is performed on a string buffer, and the given file
- is never written to. This allows the file to be safely read
- during a test run.
-
- :return: If no repair occured, then ``file`` is returned.
- Otherwise, a new file object containing the repaired JSON
- is returned.
+ If the JSON file is not closed properly, perhaps due a system
+ crash during a test run, then the JSON is repaired by
+ discarding the trailing, incomplete item and appending braces
+ to the file to close the JSON object.
+
+ The repair is performed on a string buffer, and the given file
+ is never written to. This allows the file to be safely read
+ during a test run.
+
+ :return: If no repair occured, then ``file`` is returned.
+ Otherwise, a new file object containing the repaired JSON
+ is returned.
'''
- saved_position = file.tell()
+ saved_position = file.tell()
lines = file.readlines()
- file.seek(saved_position)
+ file.seek(saved_position)
if lines[-1] == '}':
# JSON object was closed properly. No repair is
@@ -338,12 +338,12 @@ class TestrunResult:
lines.append(JSONWriter.INDENT * ' ' + '}\n')
lines.append('}')
- # Return new file object containing the repaired JSON.
- new_file = StringIO()
- new_file.writelines(lines)
- new_file.flush()
- new_file.seek(0)
- return new_file
+ # Return new file object containing the repaired JSON.
+ new_file = StringIO()
+ new_file.writelines(lines)
+ new_file.flush()
+ new_file.seek(0)
+ return new_file
def write(self, file):
# Serialize only the keys in serialized_keys.
diff --git a/tests/all.tests b/tests/all.tests
index daebbd3c..8334c7fd 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1488,7 +1488,7 @@ for num_samples in MSAA_SAMPLE_COUNTS:
for num_samples in MSAA_SAMPLE_COUNTS:
for test_mode in ('inverted', 'non-inverted'):
- test_name = ' '.join(['sample-coverage', str(num_samples), test_mode])
+ test_name = ' '.join(['sample-coverage', str(num_samples), test_mode])
executable = 'ext_framebuffer_multisample-{0} -auto'.format(
test_name)
ext_framebuffer_multisample[test_name] = PlainExecTest(executable)
diff --git a/tests/gtf.tests b/tests/gtf.tests
index 2a72ef83..396b01a0 100644
--- a/tests/gtf.tests
+++ b/tests/gtf.tests
@@ -48,11 +48,11 @@ class GTFTest(ExecTest):
ExecTest.__init__(self, [path.join(testBinDir, 'GTF'), '-width=113', '-height=47', '-seed=2', '-minfmt', '-run=' + testpath])
def interpretResult(self, out, returncode, results):
- if self.pass_re.search(out) is not None:
- results['result'] = 'pass'
- else:
- results['result'] = 'fail'
- return out
+ if self.pass_re.search(out) is not None:
+ results['result'] = 'pass'
+ else:
+ results['result'] = 'fail'
+ return out
# Populate a group with tests in the given directory:
#