fizx / pyparsley

python binding for parsley
MIT License
40 stars 4 forks source link

Test Fail #1

Open amccloud opened 14 years ago

amccloud commented 14 years ago

This is on a vanilla install of Snow Leopard

Andrew-McClouds-MacBook-Pro:fizx-pyparsley-34a7738 amccloud$ python test/
test_pyparsley.py  yelp.html          
Andrew-McClouds-MacBook-Pro:fizx-pyparsley-34a7738 amccloud$ python test/test_pyparsley.py 
...runtime error: file http://parselets.com/compiled element value-of
XPath evaluation returned no result.
E
======================================================================
ERROR: test_pruning (__main__.TestPyParsley)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_pyparsley.py", line 25, in test_pruning
    parsed = self.a_parsley.parse(file = self.file, output = "json")
RuntimeError: function match not found

----------------------------------------------------------------------
Ran 4 tests in 0.177s

FAILED (errors=1)
fizx commented 14 years ago

What does "xsltproc --version" return?

amccloud commented 14 years ago
Using libxml 20703, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20703
libexslt 813 was compiled against libxml 20703
fizx commented 14 years ago

Hmm, that's what I have too. The parselet that's not working is:

PyParsley({'links': ['regexp:match(a @href, ".sign.")']})
. The regexp:match function is not being found. This is probably a problem with the root parsley project, not the python binding. Do the tests in the root parsley project (i.e. make check) work?

amccloud commented 14 years ago
Andrew-McClouds-MacBook-Pro:fizx-parsley-4228b7a amccloud$ make check
make  check-am
ambiguous...
    success.
contains...
    success.
math_ambiguity...
    success.
content...
    success.
whitespace...
    success.
backslash...
    success.
question_regressions...
    success.
outer-xml...
    success.
segfault...
    success.
sg_off...
    success.
nth-regression...
    success.
array-regression...
    success.
fictional...
    success.
fictional-opt...
    success.
function-magic...
    success.
malformed-expr...
    success.
malformed-json...
    success.
malformed-array...
    success.
css_attr...
    success.
position...
    success.
replace...
    success.
scope...
    success.
test...
    success.
yelp...
    success.
optional...
    success.
empty...
    success.
craigs-simple...
    success.
yelp-home...
    success.
bang...
    success.
cool...
    success.
trivial2...
    success.
trivial...
    success.
match...
    success.
quote...
    success.
unbang...
    success.
malformed-xpath...
    success.
remote-fail...
    success.
crash...
    success.
reddit...
    success.
div...
    success.
default-namespace...
    success.
sg-wrap...
    success.
collate_regression...
    success.