Vadim Zeitlin
2016-12-09 17:15:50 UTC
Hi,
Travis CI seems not to mind somehow, but locally I'm getting test failures
since the recent 2a42031b085d8f4568aa90dede879ea008e1611b commit allowing
to define custom Python module importing code:
% make -C Examples/test-suite/python -s python_moduleimport.cpptest
checking python testcase python_moduleimport (with run test)
python_moduleimport.py:8:1: E265 block comment should start with '# '
python_moduleimport.py:10:1: E265 block comment should start with '# '
Makefile:107: recipe for target 'python_moduleimport.cpptest' failed
make: *** [python_moduleimport.cpptest] Error 1
Looking at the generated code, it does indeed contain "#print" lines which
result in this error.
The following trivial change:
---------------------------------- >8 --------------------------------------
diff --git a/Examples/test-suite/python_moduleimport.i b/Examples/test-suite/python_moduleimport.i
index 48b794c..f62547d 100644
--- a/Examples/test-suite/python_moduleimport.i
+++ b/Examples/test-suite/python_moduleimport.i
@@ -1,9 +1,9 @@
#if !defined(SWIGPYTHON_BUILTIN)
%define MODULEIMPORT
"
-#print 'Loading low-level module $module'
+# print 'Loading low-level module $module'
import $module
-#print 'Module has loaded'
+# print 'Module has loaded'
extra_import_variable = 'custom import of $module'
"
%enddef
@@ -11,10 +11,10 @@ extra_import_variable = 'custom import of $module'
#else
%define MODULEIMPORT
"
-#print 'Loading low-level module $module'
+# print 'Loading low-level module $module'
extra_import_variable = 'custom import of $module'
from $module import *
-#print 'Module has loaded'
+# print 'Module has loaded'
"
%enddef
#endif
---------------------------------- >8 --------------------------------------
fixes the test for me, but I wonder how does this work for Travis and,
presumably, for William. Am I missing something here? Would disabling E265
be a better fix?
Thanks,
VZ
Travis CI seems not to mind somehow, but locally I'm getting test failures
since the recent 2a42031b085d8f4568aa90dede879ea008e1611b commit allowing
to define custom Python module importing code:
% make -C Examples/test-suite/python -s python_moduleimport.cpptest
checking python testcase python_moduleimport (with run test)
python_moduleimport.py:8:1: E265 block comment should start with '# '
python_moduleimport.py:10:1: E265 block comment should start with '# '
Makefile:107: recipe for target 'python_moduleimport.cpptest' failed
make: *** [python_moduleimport.cpptest] Error 1
Looking at the generated code, it does indeed contain "#print" lines which
result in this error.
The following trivial change:
---------------------------------- >8 --------------------------------------
diff --git a/Examples/test-suite/python_moduleimport.i b/Examples/test-suite/python_moduleimport.i
index 48b794c..f62547d 100644
--- a/Examples/test-suite/python_moduleimport.i
+++ b/Examples/test-suite/python_moduleimport.i
@@ -1,9 +1,9 @@
#if !defined(SWIGPYTHON_BUILTIN)
%define MODULEIMPORT
"
-#print 'Loading low-level module $module'
+# print 'Loading low-level module $module'
import $module
-#print 'Module has loaded'
+# print 'Module has loaded'
extra_import_variable = 'custom import of $module'
"
%enddef
@@ -11,10 +11,10 @@ extra_import_variable = 'custom import of $module'
#else
%define MODULEIMPORT
"
-#print 'Loading low-level module $module'
+# print 'Loading low-level module $module'
extra_import_variable = 'custom import of $module'
from $module import *
-#print 'Module has loaded'
+# print 'Module has loaded'
"
%enddef
#endif
---------------------------------- >8 --------------------------------------
fixes the test for me, but I wonder how does this work for Travis and,
presumably, for William. Am I missing something here? Would disabling E265
be a better fix?
Thanks,
VZ