fix doctests

This commit is contained in:
Romain Bignon 2014-10-07 09:20:07 +02:00
commit c281d7a255
2 changed files with 4 additions and 0 deletions

View file

@ -538,6 +538,7 @@ class PagesBrowser(DomainBrowser):
Example:
>>> from .pages import Page
>>> class HomePage(Page):
... pass
...
@ -635,6 +636,7 @@ class PagesBrowser(DomainBrowser):
:class:`NextPage` constructor can take an url or a Request object.
>>> from .pages import HTMLPage
>>> class Page(HTMLPage):
... def iter_values(self):
... for el in self.doc.xpath('//li'):

View file

@ -47,6 +47,8 @@ def pagination(func):
... for next in self.doc.xpath('//a'):
... raise NextPage(next.attrib['href'])
...
>>> from .browsers import PagesBrowser
>>> from .url import URL
>>> class Browser(PagesBrowser):
... BASEURL = 'http://people.symlink.me'
... list = URL('/~rom1/projects/weboob/list-(?P<pagenum>\d+).html', Page)