summaryrefslogtreecommitdiff
path: root/bs4/tests/test_soup.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-01-20 16:35:45 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-01-20 16:35:45 -0500
commit6e38af3782179d1def84dd1f9279c84f8ffefd65 (patch)
treec1cda27cd64863d2a6c043e5a36a453a6a07a824 /bs4/tests/test_soup.py
parent703ee4a184e491be056ae5c4c7549e004be12622 (diff)
Tests now work in both versions, and it's possible to test both versions by running one command.
Diffstat (limited to 'bs4/tests/test_soup.py')
-rw-r--r--bs4/tests/test_soup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py
index b588561..f995678 100644
--- a/bs4/tests/test_soup.py
+++ b/bs4/tests/test_soup.py
@@ -15,15 +15,16 @@ class TestDeprecatedConstructorArguments(SoupTest):
msg = str(w[0].message)
self.assertTrue("parseOnlyThese" in msg)
self.assertTrue("parse_only" in msg)
- self.assertEquals("<b></b>", soup.encode())
+ self.assertEquals(b"<b></b>", soup.encode())
def test_fromEncoding_renamed_to_from_encoding(self):
with warnings.catch_warnings(record=True) as w:
- soup = self.soup("<a>", fromEncoding=("shift_jis"))
+ utf8 = b"\xc3\xa9"
+ soup = self.soup(utf8, fromEncoding="utf8")
msg = str(w[0].message)
self.assertTrue("fromEncoding" in msg)
self.assertTrue("from_encoding" in msg)
- self.assertEquals("shift_jis", soup.original_encoding)
+ self.assertEquals("utf8", soup.original_encoding)
def test_unrecognized_keyword_argument(self):
self.assertRaises(