<s> import os . path as op <EOL> from bento . distutils . tests . common import DistutilsCommandTestBase <EOL> from bento . distutils . dist import BentoDistribution <EOL> from bento . distutils . commands . build import build <EOL> class TestBuildCommand ( DistutilsCommandTestBase ) : <EOL> def test_hook ( self ) : <EOL> "<STR_LIT>" <EOL> fid = open ( op . join ( self . new_cwd , "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> try : <EOL> fid . write ( """<STR_LIT>""" ) <EOL> finally : <EOL> fid . close ( ) <EOL> fid = open ( op . join ( self . new_cwd , "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> try : <EOL> fid . write ( """<STR_LIT>""" ) <EOL> finally : <EOL> fid . close ( ) <EOL> dist = BentoDistribution ( ) <EOL> cmd = build ( dist ) <EOL> cmd . ensure_finalized ( ) <EOL> self . assertRaises ( ValueError , cmd . run ) </s>
