# Path: chemdataextractor/scrape/clean.py
# class Cleaner(object):
#     def __init__(self, **kwargs):
#     def __call__(self, doc):
#     def clean_html(self, html):
#     def clean_markup(self, markup, parser=None):


import logging
import unittest
from lxml.etree import tostring
from lxml import html
from chemdataextractor.scrape.clean import Cleaner, clean, strip, strip_markup, strip_html
        """Test applying the default strip to HTML document."""
        tree = html.fromstring(HTML3)
        strip(tree)
        self.assertEqual(STRIP3, tostring(tree).decode())

    def test_strip4(self):
        """Test applying the default strip to HTML document."""
        tree = html.fromstring(HTML4)
        strip(tree)
        self.assertEqual(STRIP4, tostring(tree).decode())

    def test_strip_markup_doc(self):
        """Test applying the default strip_markup to HTML document."""
        original_tree = html.fromstring(HTML1)
        original_string = tostring(original_tree).decode()
        stripped_tree = strip_markup(original_tree)
        stripped_string = tostring(stripped_tree).decode()
        self.assertEqual(STRIP1, stripped_string)
        self.assertEqual(original_string, tostring(original_tree).decode())  # tree shouldn't change as strip_markup copies

    def test_strip_html1(self):
        """Test applying the default strip_markup to HTML string."""
        self.assertEqual(STRIP1, strip_html(HTML1))

    def test_strip_html2(self):
        """Test applying the default strip_markup to HTML string."""
        self.assertEqual(STRIP2, strip_html(HTML2))

    def test_strip_html3(self):
        """Test applying the default strip_markup to HTML string."""

# Path: chemdataextractor/scrape/clean.py
# class Cleaner(object):
#     def __init__(self, **kwargs):
#     def __call__(self, doc):
#     def clean_html(self, html):
#     def clean_markup(self, markup, parser=None):


# Path: tests/test_scrape_clean.py
import logging
import unittest
from lxml.etree import tostring
from lxml import html
from chemdataextractor.scrape.clean import Cleaner, clean, strip, strip_markup, strip_html

        """Test applying the default strip to HTML document."""
        tree = html.fromstring(HTML3)
        strip(tree)
        self.assertEqual(STRIP3, tostring(tree).decode())

    def test_strip4(self):
        """Test applying the default strip to HTML document."""
        tree = html.fromstring(HTML4)
        strip(tree)
        self.assertEqual(STRIP4, tostring(tree).decode())

    def test_strip_markup_doc(self):
        """Test applying the default strip_markup to HTML document."""
        original_tree = html.fromstring(HTML1)
        original_string = tostring(original_tree).decode()
        stripped_tree = strip_markup(original_tree)
        stripped_string = tostring(stripped_tree).decode()
        self.assertEqual(STRIP1, stripped_string)
        self.assertEqual(original_string, tostring(original_tree).decode())  # tree shouldn't change as strip_markup copies

    def test_strip_html1(self):
        """Test applying the default strip_markup to HTML string."""
        self.assertEqual(STRIP1, strip_html(HTML1))

    def test_strip_html2(self):
        """Test applying the default strip_markup to HTML string."""
        self.assertEqual(STRIP2, strip_html(HTML2))

    def test_strip_html3(self):
        """Test applying the default strip_markup to HTML string."""

        self.assertEqual(STRIP3, strip_html(HTML3))