summaryrefslogtreecommitdiff
path: root/bs4/tests/test_html5lib.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-02-20 10:01:21 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-02-20 10:01:21 -0500
commit0909884d21621394c0e810c508ceb4a4743ab8b5 (patch)
tree91993561e21eb2c26bfd06f1a30192b79d88a676 /bs4/tests/test_html5lib.py
parent6c25290f92453294397049661f5edc36af562082 (diff)
Added code from 2.7's standard library so that the tests will run on Python 2.6.
Diffstat (limited to 'bs4/tests/test_html5lib.py')
-rw-r--r--bs4/tests/test_html5lib.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py
index d972b2d..f1f3727 100644
--- a/bs4/tests/test_html5lib.py
+++ b/bs4/tests/test_html5lib.py
@@ -10,8 +10,9 @@ from test_lxml import (
TestLXMLBuilderEncodingConversion,
)
import unittest
+from bs4.testing import skipIf
-@unittest.skipIf(
+@skipIf(
not HTML5LIB_PRESENT,
"html5lib seems not to be present, not testing its tree builder.")
class TestHTML5Builder(TestLXMLBuilder):
@@ -81,7 +82,7 @@ class TestHTML5Builder(TestLXMLBuilder):
# get a CData object.
self.assertSoupEquals(markup, "<svg><!--[CDATA[foobar]]--></svg>")
-@unittest.skipIf(
+@skipIf(
not HTML5LIB_PRESENT,
"html5lib seems not to be present, not testing it on invalid markup.")
class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup):
@@ -246,7 +247,7 @@ class TestHTML5BuilderInvalidMarkup(TestLXMLBuilderInvalidMarkup):
self.assertEqual(soup.p.string, u"\N{REPLACEMENT CHARACTER}")
-@unittest.skipIf(
+@skipIf(
not HTML5LIB_PRESENT,
"html5lib seems not to be present, not testing encoding conversion.")
class TestHTML5LibEncodingConversion(TestLXMLBuilderEncodingConversion):