Merge lp:~mitya57/beautifulsoup/tests into lp:beautifulsoup

Proposed by Dmitry Shachnev
Status: Merged
Merge reported by: Dmitry Shachnev
Merged at revision: not available
Proposed branch: lp:~mitya57/beautifulsoup/tests
Merge into: lp:beautifulsoup
Diff against target: 15 lines (+2/-2)
1 file modified
bs4/tests/test_soup.py (+2/-2)
To merge this branch: bzr merge lp:~mitya57/beautifulsoup/tests
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Leonard Richardson Pending
Review via email: mp+241832@code.launchpad.net

Description of the change

In Ubuntu we currently get tests failures for BeautifulSoup4 test suite when chardet is installed:
https://jenkins.qa.ubuntu.com/view/Vivid/view/AutoPkgTest/job/vivid-adt-beautifulsoup4/

This branch fixes the failure by doubling the string (é → éé) to make chardet correctly detect the encoding.

See https://github.com/chardet/chardet/issues/37 for chardet developers' response to my bug about this behavior.

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks. Uploaded.

review: Approve
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bs4/tests/test_soup.py'
2--- bs4/tests/test_soup.py 2013-10-02 12:18:54 +0000
3+++ bs4/tests/test_soup.py 2014-11-14 17:19:09 +0000
4@@ -271,9 +271,9 @@
5 dammit.unicode_markup, """<foo>''""</foo>""")
6
7 def test_detect_utf8(self):
8- utf8 = b"\xc3\xa9"
9+ utf8 = b"\xc3\xa9\xc3\xa9"
10 dammit = UnicodeDammit(utf8)
11- self.assertEqual(dammit.unicode_markup, u'\xe9')
12+ self.assertEqual(dammit.unicode_markup, u'\xe9\xe9')
13 self.assertEqual(dammit.original_encoding.lower(), 'utf-8')
14
15 def test_convert_hebrew(self):

Subscribers

People subscribed via source and target branches

to status/vote changes: