summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2016-07-16 22:28:40 -0400
committerLeonard Richardson <leonardr@segfault.org>2016-07-16 22:28:40 -0400
commitf18cbadf256b24912837c8b0d7fd6a2dc1a1d640 (patch)
tree9f8459bab4cdcf79ae76abea31025b22ce1cd111 /bs4/testing.py
parent120f4fcedc825b6c207263858e5bbded60a7886e (diff)
Beautiful Soup will now work with versions of html5lib greater than
0.99999999. [bug=1603299]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index 676d7b3..387f775 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -495,7 +495,9 @@ Hello, world!
hebrew_document = b'<html><head><title>Hebrew (ISO 8859-8) in Visual Directionality</title></head><body><h1>Hebrew (ISO 8859-8) in Visual Directionality</h1>\xed\xe5\xec\xf9</body></html>'
soup = self.soup(
hebrew_document, from_encoding="iso8859-8")
- self.assertEqual(soup.original_encoding, 'iso8859-8')
+ # Some tree builders call it iso8859-8, others call it iso-8859-9.
+ # That's not a difference we really care about.
+ assert soup.original_encoding in ('iso8859-8', 'iso-8859-8')
self.assertEqual(
soup.encode('utf-8'),
hebrew_document.decode("iso8859-8").encode("utf-8"))