<s> from __future__ import unicode_literals <EOL> import tempfile <EOL> import shutil <EOL> from mock import Mock , patch <EOL> from nose . tools import ok_ <EOL> from nose . plugins . attrib import attr <EOL> from sprinter . testtools import FormulaTest , set_os_types <EOL> import sprinter . lib as lib <EOL> source_config = """<STR_LIT:U+0020>""" <EOL> target_config = """<STR_LIT>""" <EOL> class TestPerforceFormula ( FormulaTest ) : <EOL> """<STR_LIT>""" <EOL> def setup ( self ) : <EOL> self . temp_dir = tempfile . mkdtemp ( ) <EOL> super ( TestPerforceFormula , self ) . setup ( <EOL> source_config = source_config , <EOL> target_config = target_config . format ( <EOL> tmpdir = self . temp_dir <EOL> ) <EOL> ) <EOL> def teardown ( self ) : <EOL> del ( self . environment ) <EOL> shutil . rmtree ( self . temp_dir ) <EOL> @ attr ( '<STR_LIT>' ) <EOL> def test_install ( self ) : <EOL> with patch ( '<STR_LIT>' ) as extract_targz : <EOL> with set_os_types ( debian = True ) : <EOL> with patch ( '<STR_LIT>' ) as call : <EOL> self . environment . run_feature ( "<STR_LIT>" , '<STR_LIT>' ) <EOL> ok_ ( extract_targz . called ) </s>
