<s> import unittest , sys <EOL> from lxml . tests . common_imports import make_doctest , HelperTestCase <EOL> try : <EOL> import BeautifulSoup <EOL> BS_INSTALLED = True <EOL> except ImportError : <EOL> BS_INSTALLED = False <EOL> if BS_INSTALLED : <EOL> class SoupParserTestCase ( HelperTestCase ) : <EOL> from lxml . html import soupparser <EOL> def test_broken_attribute ( self ) : <EOL> html = """<STR_LIT>""" <EOL> root = self . soupparser . fromstring ( html ) <EOL> self . assertTrue ( root . find ( '<STR_LIT>' ) . get ( '<STR_LIT>' ) is not None ) <EOL> def test_suite ( ) : <EOL> suite = unittest . TestSuite ( ) <EOL> if BS_INSTALLED : <EOL> suite . addTests ( [ unittest . makeSuite ( SoupParserTestCase ) ] ) <EOL> if sys . version_info [ <NUM_LIT:0> ] < <NUM_LIT:3> : <EOL> suite . addTests ( [ make_doctest ( '<STR_LIT>' ) ] ) <EOL> return suite <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
