summaryrefslogtreecommitdiff
path: root/src/beautifulsoup/tests/test_tree.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2010-12-29 20:23:24 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2010-12-29 20:23:24 -0500
commitd9c95565a7db3272f1e7337eca5234ab0d64dfd2 (patch)
tree4345637156e9b2fb1ad77e1b8d4975abef3b4f8d /src/beautifulsoup/tests/test_tree.py
parent8cb6ce2d884ad4518ce55bb6f77bd371d4fc5c71 (diff)
Added a test to ensure that you can search for a Unicode string.
Diffstat (limited to 'src/beautifulsoup/tests/test_tree.py')
-rw-r--r--src/beautifulsoup/tests/test_tree.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/beautifulsoup/tests/test_tree.py b/src/beautifulsoup/tests/test_tree.py
index 1e87be0..191ec59 100644
--- a/src/beautifulsoup/tests/test_tree.py
+++ b/src/beautifulsoup/tests/test_tree.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""Tests for Beautiful Soup's tree traversal methods.
The tree traversal methods are the main advantage of using Beautiful
@@ -33,6 +34,14 @@ class TreeTest(SoupTest):
self.assertEqual([tag['id'] for tag in tags], should_match)
+class TestFind(TreeTest):
+ """Basic tests of the find() method."""
+
+ def test_unicode_text_find(self):
+ soup = self.soup(u'<h1>Räksmörgås</h1>')
+ self.assertEqual(soup.find(text=u'Räksmörgås'), u'Räksmörgås')
+
+
class TestFindAll(TreeTest):
"""Basic tests of the findAll() method."""