summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-02-20 12:04:36 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-02-20 12:04:36 -0500
commit7283761096d81f87d313c08c2915d6ee19bc6a36 (patch)
tree0573344b23e73a33b1a0380ed42db2a15116dd73
parentab7ed77ab3560f6d574d577befc7a1f593e45327 (diff)
Tests now pass if neither lxml nor html5lib is installed.
-rw-r--r--TODO.txt5
-rw-r--r--bs4/tests/test_builder_registry.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/TODO.txt b/TODO.txt
index 8b239b1..fc305fb 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,9 +1,8 @@
Bugs
----
-* Issue a DataLossWarning if Unicode, Dammit replaces characters.
-
-* I think whitespace may not be processed correctly.
+* You can't deepcopy a tree if it was created with the html.parser
+ tree builder.
* html5lib doesn't support SoupStrainers, which is OK, but there
should be a warning about it.
diff --git a/bs4/tests/test_builder_registry.py b/bs4/tests/test_builder_registry.py
index 84b2daf..92ad10f 100644
--- a/bs4/tests/test_builder_registry.py
+++ b/bs4/tests/test_builder_registry.py
@@ -47,8 +47,11 @@ class BuiltInRegistryTest(unittest.TestCase):
self.assertEqual(registry.lookup('html'), LXMLTreeBuilder)
self.assertEqual(registry.lookup('xml'), LXMLTreeBuilderForXML)
else:
- self.assertEqual(registry.lookup('html'), HTML5TreeBuilder)
self.assertEqual(registry.lookup('xml'), None)
+ if HTML5LIB_PRESENT:
+ self.assertEqual(registry.lookup('html'), HTML5TreeBuilder)
+ else:
+ self.assertEqual(registry.lookup('html'), HTMLParserTreeBuilder)
def test_named_library(self):
if LXML_PRESENT: