[Python-projects] pylint doesn't like lxml.etree.fromstring

Mikhail Gusarov mgusarov at swsoft.com
Fri Dec 22 08:32:26 CET 2006


Hello,

pyunit does not recongize lxml.etree.fromstring function. (lxml may be
obtained from http://codespeak.net/lxml/ or from python-lxml Debian
package). Here is the testcase:

------------------------------------------------------------------------
import lxml.etree
lxml.etree.fromstring("<a/>")
------------------------------------------------------------------------

pyunit says
------------------------------------------------------------------------
E:  3: Module 'lxml.etree' has no 'fromstring' member
------------------------------------------------------------------------

however
------------------------------------------------------------------------
[mag at origin:~]% python
Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
[GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.etree
>>> lxml.etree.fromstring
<built-in function XML>
>>>
------------------------------------------------------------------------

Seems that pyunit is confused by the pure-python module with function
assigned from the compiled library.

System information:
linux, python 2.4.4, pyunit 0.21.1, lxml 1.1.1

-- 
Mikhail Gusarov
Senior Software Engineer
SWsoft, Inc.
JID: dottedmag at jabber.dottedmag.net


More information about the Python-Projects mailing list