# 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_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))

    def test_strip_leave_whitespace1(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML1)
        cleaner(tree)
        self.assertEqual(STRIPWS1, tostring(tree).decode())

    def test_strip_leave_whitespace2(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML2)
        cleaner(tree)
        self.assertEqual(STRIPWS2, tostring(tree).decode())

    def test_strip_leave_whitespace3(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML3)
        cleaner(tree)
        self.assertEqual(STRIPWS3, tostring(tree).decode())

    def test_strip_leave_whitespace4(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""

# 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_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))

    def test_strip_leave_whitespace1(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML1)
        cleaner(tree)
        self.assertEqual(STRIPWS1, tostring(tree).decode())

    def test_strip_leave_whitespace2(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML2)
        cleaner(tree)
        self.assertEqual(STRIPWS2, tostring(tree).decode())

    def test_strip_leave_whitespace3(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""
        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')
        tree = html.fromstring(HTML3)
        cleaner(tree)
        self.assertEqual(STRIPWS3, tostring(tree).decode())

    def test_strip_leave_whitespace4(self):
        """Test applying a ``Cleaner`` instance with ``fix_whitespace=False``."""

        cleaner = Cleaner(fix_whitespace=False, strip_xpath='.//*')