From 5b3edbe7ef552f09cb5cae62bcdfd7bac0a86f2b Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Fri, 2 Mar 2012 08:11:28 -0500 Subject: Fixed a bug that caused calling a tag to sometimes call find_all() with the wrong arguments. [bug=944426] --- bs4/tests/test_tree.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bs4/tests/test_tree.py') diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index 3f32736..6d22448 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -99,6 +99,11 @@ class TestFindAll(TreeTest): self.assertSelects( soup.find_all('a', limit=0), ["1", "2", "3", "4", "5"]) + def test_calling_a_tag_is_calling_findall(self): + soup = self.soup("123") + self.assertSelects(soup('a', limit=1), ["1"]) + self.assertSelects(soup.b(id="foo"), ["3"]) + class TestFindAllBasicNamespaces(TreeTest): def test_find_by_namespaced_name(self): -- cgit v1.2.3