@@ -0,0 +1,1110 @@
+from tests.html import TestGetEtree%0Afrom libextract.html.tabular import children_counter, %5C%0A        get_node_counter_pairs, node_counter_argmax, %5C%0A        sort_best_pairs%0A%0A%0Aclass TestChildrenCounter(TestGetEtree):%0A    def runTest(self):%0A        article = self.etree.xpath('//body/article')%5B0%5D%0A        counter = children_counter(article)%0A%0A        assert len(counter) == 1%0A        assert counter%5B'div'%5D == 9%0A%0A%0Aclass TestGetNodeCounterPairs(TestGetEtree):%0A    def setUp(self):%0A        TestGetEtree.setUp(self)%0A        self.pairs = get_node_counter_pairs(self.etree)%0A%0A    def runTest(self):%0A        u = %7Belem.tag: counter for elem, counter in self.pairs%7D%0A        u.pop('head')%0A        assert u == %7B%0A            'article': %7B'div': 9%7D,%0A            'body': %7B'article': 1, 'footer': 1%7D,%0A            'html': %7B'body': 1, 'head': 1%7D,%0A            %7D%0A%0A%0Aclass TestSortBestPairs(TestGetNodeCounterPairs):%0A    def runTest(self):%0A        article = self.etree.xpath('//body/article')%5B0%5D%0A        u = sort_best_pairs(node_counter_argmax(self.pairs), limit=1)%0A        assert u == %5B%0A            (article, %5B('div', 9)%5D)%0A            %5D%0A

test html.tabular