scrapy / scrapely

A pure-python HTML screen-scraping library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random failing doctests

dangra opened this issue · comments

I have run the testsuite multiple times and some times it fails (and sometime it doesnt) due to:

======================================================================
FAIL: Doctest: scrapely.extraction.regionextract.RecordExtractor
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scrapely.extraction.regionextract.RecordExtractor
  File "/home/daniel/src/scrapely/scrapely/extraction/regionextract.py", line 291, in RecordExtractor

----------------------------------------------------------------------
File "/home/daniel/src/scrapely/scrapely/extraction/regionextract.py", line 306, in scrapely.extraction.regionextract.RecordExtractor
Failed example:
    ex.extract(page)
Expected:
    [{u'description': [u'description'], u'name': [u'name']}]
Got:
    [{u'name': [u'name'], u'description': [u'description']}]


----------------------------------------------------------------------
Ran 99 tests in 0.578s

FAILED (failures=1)
ERROR: InvocationError: '/home/daniel/src/scrapely/.tox/py27/bin/nosetests scrapely tests'
_______________________________________________________________________________________________ summary _______________________________________________________________________________________________
ERROR:   py27: commands failed