summaryrefslogtreecommitdiff
path: root/bs4/tests/test_tree.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-08 12:59:45 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-08 12:59:45 -0400
commit74a499a033623a164ca2756065fdcc9348b7382c (patch)
tree0d3bd6ca55bf0d24057e9df70f2504ef56d99ceb /bs4/tests/test_tree.py
parent61637bf35e5f19629b9514d41e57750549823f0a (diff)
A CSS selector should never match the same tag twice.
Diffstat (limited to 'bs4/tests/test_tree.py')
-rw-r--r--bs4/tests/test_tree.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py
index 77d4199..b07de8c 100644
--- a/bs4/tests/test_tree.py
+++ b/bs4/tests/test_tree.py
@@ -1802,3 +1802,6 @@ class TestSoupSelector(TreeTest):
def test_dangling_combinator(self):
self.assertRaises(ValueError, self.soup.select, 'h1 >')
+
+ def test_sibling_combinator_wont_select_same_tag_twice(self):
+ self.assertSelects('p[lang] ~ p', ['lang-en-gb', 'lang-en-us', 'lang-fr'])