about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/woob/no-test-requiring-network.patch
blob: 7095019d0541765d20baa1f8f2d805247ec36d03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- a/woob/browser/browsers.py
+++ b/woob/browser/browsers.py
@@ -930,23 +930,6 @@

         :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'):
-        ...             yield el.text
-        ...         for next in self.doc.xpath('//a'):
-        ...             raise NextPage(next.attrib['href'])
-        ...
-        >>> class Browser(PagesBrowser):
-        ...     BASEURL = 'https://woob.tech'
-        ...     list = URL('/tests/list-(?P<pagenum>\d+).html', Page)
-        ...
-        >>> b = Browser()
-        >>> b.list.go(pagenum=1) # doctest: +ELLIPSIS
-        <woob.browser.browsers.Page object at 0x...>
-        >>> list(b.pagination(lambda: b.page.iter_values()))
-        ['One', 'Two', 'Three', 'Four']
         """
         while True:
             try:
--- a/woob/browser/pages.py
+++ b/woob/browser/pages.py
@@ -49,25 +49,6 @@

     :class:`NextPage` constructor can take an url or a Request object.

-    >>> class Page(HTMLPage):
-    ...     @pagination
-    ...     def iter_values(self):
-    ...         for el in self.doc.xpath('//li'):
-    ...             yield el.text
-    ...         for next in self.doc.xpath('//a'):
-    ...             raise NextPage(next.attrib['href'])
-    ...
-    >>> from .browsers import PagesBrowser
-    >>> from .url import URL
-    >>> class Browser(PagesBrowser):
-    ...     BASEURL = 'https://woob.tech'
-    ...     list = URL('/tests/list-(?P<pagenum>\d+).html', Page)
-    ...
-    >>> b = Browser()
-    >>> b.list.go(pagenum=1) # doctest: +ELLIPSIS
-    <woob.browser.pages.Page object at 0x...>
-    >>> list(b.page.iter_values())
-    ['One', 'Two', 'Three', 'Four']
     """

     @wraps(func)