Package: python-parsel / 1.7.0+dfsg-1

0001-Skip-some-doctests-that-don-t-work-in-a-package.patch Patch series | download
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
55
56
57
58
59
60
61
62
63
64
From: Andrey Rahmatullin <wrar@debian.org>
Date: Tue, 24 Aug 2021 23:11:08 +0500
Subject: Skip some doctests that don't work in a package.

---
 docs/usage.rst | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/usage.rst b/docs/usage.rst
index dcef13d..c62bb51 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -858,6 +858,7 @@ Using CSS selectors in multi-root documents
 Some webpages may have multiple root elements. It can happen, for example, when
 a webpage has broken code, such as missing closing tags.
 
+.. skip: start
 .. invisible-code-block: python
 
    selector = load_selector('multiroot.html')
@@ -877,6 +878,7 @@ you need to precede your CSS query by an XPath query that reaches all root
 elements::
 
     selector.xpath('/*').css('<your CSS selector>')
+.. skip: end
 
 
 Command-Line Interface Tools
@@ -973,8 +975,6 @@ Let's download the atom feed using :mod:`requests` and create a selector:
 >>> text = requests.get('https://feeds.feedburner.com/PythonInsider').text
 >>> sel = Selector(text=text, type='xml')
 
-.. skip: end
-
 .. invisible-code-block: python
 
    sel = load_selector('python-insider.xml', type='xml')
@@ -1015,6 +1015,8 @@ directly by their names::
      <Selector xpath='//link' data='<link rel="next" type="application/at...'>,
      ...]
 
+.. skip: end
+
 If you wonder why the namespace removal procedure isn't called always by default
 instead of having to call it manually, this is because of two reasons, which, in order
 of relevance, are:
@@ -1047,8 +1049,6 @@ Let's use the same Python Insider Atom feed:
 >>> text = requests.get('https://feeds.feedburner.com/PythonInsider').text
 >>> sel = Selector(text=text, type='xml')
 
-.. skip: end
-
 .. invisible-code-block: python
 
    sel = load_selector('python-insider.xml', type='xml')
@@ -1070,6 +1070,8 @@ You can pass several namespaces (here we're using shorter 1-letter prefixes)::
      'https://img1.blogblog.com/img/b16-rounded.gif',
      ...]
 
+.. skip: end
+
 .. _topics-xpath-variables:
 
 Variables in XPath expressions