'You can search the tree for text nodes.'

def test_find_all_text_nodes(self):

    soup = self.soup('<html>Foo<b>bar</b>\xbb</html>')
    self.assertEqual(soup.find_all(text='bar'), [u'bar'])
    self.assertEqual(soup.find_all(text=['Foo', 'bar']), [u'Foo', u'bar'])
    self.assertEqual(soup.find_all(text=re.compile('.*')), [u'Foo', u'bar', u'\xbb'])
    self.assertEqual(soup.find_all(text=True), [u'Foo', u'bar', u'\xbb'])
