Hello,
I am representing Oracle, and currently working on upgrading pylxml in
Solaris. We have encountered an issue while running test.py, where
cov.xml_report() and cov.html_report() are generating a syntax error in
lxml.etree.pyx.
coverage.misc.NotPython: Couldn't parse
'$(SOURCE_DIR)/src/lxml/lxml.etree.pyx' as Python source: 'invalid syntax'
at line 44
Line 44 of lxml.etree.pyx is "cimport cython", and test.py does not seem
to be recognizing it. We have checked that valid python (2.7.12) and
cython (0.25.1) versions are being used.
For now, we have created the following patch, which suppresses the error:
--- lxml-3.6.4/test.py_orig 2017-01-11 14:03:08.523061540 +0000
+++ lxml-3.6.4/test.py 2017-01-11 14:03:27.417867156 +0000
@@ -606,14 +606,6 @@
walker = os.path.walk
walker(os.path.abspath(cfg.basedir), add_file, None)
- try:
- cov.xml_report(modules, outfile='coverage.xml')
- if cfg.coverdir:
- cov.html_report(modules, directory=cfg.coverdir)
- finally:
- # test runs can take a while, so at least try to print
something
- cov.report()
-
# That's all
if success:
return 0
Additional info below:
>>> print("%-20s: %s" % ('Python', sys.version_info))
Python : sys.version_info(major=2, minor=7, micro=12,
releaselevel='final', serial=0)
>>> print("%-20s: %s" % ('lxml.etree', etree.LXML_VERSION))
lxml.etree : (3, 6, 4, 0)
>>> print("%-20s: %s" % ('libxml used', etree.LIBXML_VERSION))
libxml used : (2, 9, 4)
>>> print("%-20s: %s" % ('libxml compiled',
etree.LIBXML_COMPILED_VERSION))
libxml compiled : (2, 9, 4)
>>> print("%-20s: %s" % ('libxslt used', etree.LIBXSLT_VERSION))
libxslt used : (1, 1, 28)
>>> print("%-20s: %s" % ('libxslt compiled',
etree.LIBXSLT_COMPILED_VERSION))
libxslt compiled : (1, 1, 28)
Please let us know if there is additional information we can provide.
Thank you,
Esha Wang