/[gentoo-x86]/dev-python/beautifulsoup/files/bfs-4.2.0-no-lxml.patch
Gentoo

Contents of /dev-python/beautifulsoup/files/bfs-4.2.0-no-lxml.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Wed May 22 15:29:59 2013 UTC (7 years, 5 months ago) by idella4
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Add lxml to IUSE being an optional rdep, switch lxml to RDEP, add use lxml to metadata, optional rdep html5lib blocked by Bug 471002, re-add pypy2 support to 4.2.0, patch to fix tests for 4.2.0

1 idella4 1.1 === modified file 'bs4/testing.py'
2     --- bs4/testing.py 2013-05-07 12:19:02 +0000
3     +++ bs4/testing.py 2013-05-20 13:19:16 +0000
4     @@ -464,6 +464,18 @@
5     self.assertEqual(
6     soup.encode("utf-8"), markup)
7    
8     + def test_formatter_processes_script_tag_for_xml_documents(self):
9     + doc = """
10     + <script type="text/javascript">
11     + </script>
12     +"""
13     + soup = BeautifulSoup(doc, "xml")
14     + # lxml would have stripped this while parsing, but we can add
15     + # it later.
16     + soup.script.string = 'console.log("< < hey > > ");'
17     + encoded = soup.encode()
18     + self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
19     +
20     def test_popping_namespaced_tag(self):
21     markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>'
22     soup = self.soup(markup)
23    
24     === modified file 'bs4/tests/test_lxml.py'
25     --- bs4/tests/test_lxml.py 2013-05-09 19:36:30 +0000
26     +++ bs4/tests/test_lxml.py 2013-05-20 13:19:16 +0000
27     @@ -10,6 +10,7 @@
28     LXML_VERSION = lxml.etree.LXML_VERSION
29     except ImportError, e:
30     LXML_PRESENT = False
31     + LXML_VERSION = (0,)
32    
33     from bs4 import (
34     BeautifulSoup,
35     @@ -47,7 +48,7 @@
36     # test if an old version of lxml is installed.
37    
38     @skipIf(
39     - LXML_VERSION < (2,3,5,0),
40     + not LXML_PRESENT or LXML_VERSION < (2,3,5,0),
41     "Skipping doctype test for old version of lxml to avoid segfault.")
42     def test_empty_doctype(self):
43     soup = self.soup("<!DOCTYPE>")
44    
45     === modified file 'bs4/tests/test_tree.py'
46     --- bs4/tests/test_tree.py 2013-05-14 12:39:16 +0000
47     +++ bs4/tests/test_tree.py 2013-05-20 13:19:16 +0000
48     @@ -1344,18 +1344,6 @@
49     encoded = BeautifulSoup(doc).encode()
50     self.assertTrue(b"< < hey > >" in encoded)
51    
52     - def test_formatter_processes_script_tag_for_xml_documents(self):
53     - doc = """
54     - <script type="text/javascript">
55     - </script>
56     -"""
57     - soup = BeautifulSoup(doc, "xml")
58     - # lxml would have stripped this while parsing, but we can add
59     - # it later.
60     - soup.script.string = 'console.log("< < hey > > ");'
61     - encoded = soup.encode()
62     - self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
63     -
64     def test_prettify_leaves_preformatted_text_alone(self):
65     soup = self.soup("<div> foo <pre> \tbar\n \n </pre> baz ")
66     # Everything outside the <pre> tag is reformatted, but everything
67    

  ViewVC Help
Powered by ViewVC 1.1.20