<s> import unittest <EOL> from os . path import abspath , dirname , join <EOL> import sys <EOL> DIR_TESTS = abspath ( dirname ( __file__ ) ) <EOL> DIR_LIB = join ( dirname ( DIR_TESTS ) , '<STR_LIT>' ) <EOL> sys . path . insert ( <NUM_LIT:0> , DIR_LIB ) <EOL> from b2tob3 . b2tob3 import make_replacements <EOL> def get_replacement ( fname ) : <EOL> with open ( join ( DIR_TESTS , fname ) , '<STR_LIT:r>' ) as f : <EOL> content = f . read ( ) <EOL> return make_replacements ( content ) <EOL> class B2tob3TestSuite ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_html_count ( self ) : <EOL> ( content , count ) = get_replacement ( '<STR_LIT>' ) <EOL> self . assertEqual ( count , <NUM_LIT> ) <EOL> def test_html_match ( self ) : <EOL> ( content , count ) = get_replacement ( '<STR_LIT>' ) <EOL> self . assertRegexpMatches ( content , '<STR_LIT>' ) </s>
