These warnings have become fatal errors in Python 3.x.
---
 framework/core.py |   40 ++++++++++++++++++++--------------------
 tests/all.tests   |    2 +-
 tests/gtf.tests   |   10 +++++-----
 3 filer ändrade, 26 tillägg(+), 26 borttagningar(-)

diff --git a/framework/core.py b/framework/core.py
index 08f442f..ed6f15e 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 daebbd3..8334c7f 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 1d0070a..8092537 100644
--- a/tests/gtf.tests
+++ b/tests/gtf.tests
@@ -48,11 +48,11 @@ class GTFTest(ExecTest):
         ExecTest.__init__(self, [path.join(testBinDir, 'GTF'), 
'-noimagefileio', '-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:
 #
-- 
1.7.10.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to