Package: gcc-python-plugin / 0.17-2

py-encoding.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Index: b/run-test-suite.py
===================================================================
--- a/run-test-suite.py
+++ b/run-test-suite.py
@@ -327,8 +327,12 @@ def run_test(testdir):
     # uses Python.h:
     def uses_python_headers():
         for inputfile in inputfiles:
-            with open(inputfile, 'r') as f:
-                code = f.read()
+            if six.PY3:
+                with open(inputfile, 'r', encoding='utf-8') as f:
+                    code = f.read()
+            else:
+                with open(inputfile, 'r') as f:
+                    code = f.read()
             if '#include <Python.h>' in code:
                 return True
 
@@ -777,7 +781,7 @@ class TestRunner:
                               num(len(self.skipped_tests), "skipped", "skipped")))
 
 tr = TestRunner()
-if 1:
+if 0:
     tr.run_tests_in_parallel(sorted(testdirs))
 else:
     tr.run_tests(sorted(testdirs))