diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-23 13:38:46 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-23 13:38:46 -0500 |
commit | 6f15d9569be0f247a00a9d900246124bdeecec87 (patch) | |
tree | ac1fe61b46559c9be2b6bf8da67c7d8fc35e1c64 | |
parent | 951d355581d27c2f3b61fa582fbe6ae57b46afb4 (diff) |
A bit more testing.
-rw-r--r-- | bs4/testing.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 55b953f..e6f7f75 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -404,16 +404,19 @@ class HTML5TreeBuilderSmokeTest(HTMLTreeBuilderSmokeTest): self.assertEqual("http://www.w3.org/1999/xhtml", soup.a.namespace) def test_svg_tags_have_namespace(self): - markup = '<svg>' + markup = '<svg><circle/></svg>' soup = self.soup(markup) - self.assertEqual("http://www.w3.org/2000/svg", soup.svg.namespace) + namespace = "http://www.w3.org/2000/svg" + self.assertEqual(namespace, soup.svg.namespace) + self.assertEqual(namespace, soup.circle.namespace) + def test_mathml_tags_have_namespace(self): - markup = '<math>' + markup = '<math><sqrt>5</sqrt></math>' soup = self.soup(markup) - self.assertEqual( - 'http://www.w3.org/1998/Math/MathML', soup.math.namespace) - + namespace = 'http://www.w3.org/1998/Math/MathML' + self.assertEqual(namespace, soup.math.namespace) + self.assertEqual(namespace, soup.sqrt.namespace) def skipIf(condition, reason): def nothing(test, *args, **kwargs): |