<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import platform <EOL> import gslib <EOL> from gslib . cs_api_map import ApiSelector <EOL> import gslib . tests . testcase as testcase <EOL> from gslib . tests . testcase . integration_testcase import SkipForS3 <EOL> from gslib . tests . util import ObjectToURI as suri <EOL> from gslib . tests . util import SetBotoConfigForTest <EOL> from gslib . util import ONE_KIB <EOL> @ SkipForS3 ( '<STR_LIT>' ) <EOL> class TestDOption ( testcase . GsUtilIntegrationTestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_minus_D_multipart_upload ( self ) : <EOL> """<STR_LIT>""" <EOL> for file_contents in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> fpath = self . CreateTempFile ( contents = file_contents ) <EOL> bucket_uri = self . CreateBucket ( ) <EOL> with SetBotoConfigForTest ( <EOL> [ ( '<STR_LIT>' , '<STR_LIT>' , str ( ONE_KIB ) ) ] ) : <EOL> stderr = self . RunGsUtil ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , fpath , suri ( bucket_uri ) ] , return_stderr = True ) <EOL> print '<STR_LIT>' + '<STR_LIT:U+0020>' . join ( [ '<STR_LIT>' , '<STR_LIT>' , fpath , suri ( bucket_uri ) ] ) <EOL> if self . test_api == ApiSelector . JSON : <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertNotIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' % len ( file_contents ) , <EOL> stderr ) <EOL> def test_minus_D_perf_trace_cp ( self ) : <EOL> """<STR_LIT>""" <EOL> file_name = '<STR_LIT:bar>' <EOL> fpath = self . CreateTempFile ( file_name = file_name , contents = '<STR_LIT:foo>' ) <EOL> bucket_uri = self . CreateBucket ( ) <EOL> stderr = self . RunGsUtil ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , fpath , <EOL> suri ( bucket_uri ) ] , return_stderr = True ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> stderr2 = self . RunGsUtil ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> suri ( bucket_uri , file_name ) , fpath ] , <EOL> return_stderr = True ) <EOL> self . assertIn ( '<STR_LIT>' , stderr2 ) <EOL> def test_minus_D_resumable_upload ( self ) : <EOL> fpath = self . CreateTempFile ( contents = '<STR_LIT>' ) <EOL> bucket_uri = self . CreateBucket ( ) <EOL> with SetBotoConfigForTest ( [ ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:4>' ) ] ) : <EOL> stderr = self . RunGsUtil ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , fpath , suri ( bucket_uri ) ] , return_stderr = True ) <EOL> self . assertNotIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> def test_minus_D_cat ( self ) : <EOL> """<STR_LIT>""" <EOL> key_uri = self . CreateObject ( contents = '<STR_LIT>' ) <EOL> with SetBotoConfigForTest ( [ ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ] ) : <EOL> ( stdout , stderr ) = self . RunGsUtil ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , suri ( key_uri ) ] , return_stdout = True , return_stderr = True ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( "<STR_LIT>" , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( "<STR_LIT>" , stderr ) <EOL> self . assertIn ( "<STR_LIT>" , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> if self . test_api == ApiSelector . XML : <EOL> self . assertRegexpMatches ( <EOL> stderr , '<STR_LIT>' % <EOL> ( key_uri . bucket_name , key_uri . object_name , gslib . VERSION ) ) <EOL> self . assertIn ( '<STR_LIT>' , <EOL> stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> self . assertIn ( '<STR_LIT>' , stderr ) <EOL> elif self . test_api == ApiSelector . JSON : <EOL> self . assertRegexpMatches ( <EOL> stderr , '<STR_LIT>' % <EOL> ( key_uri . bucket_name , key_uri . object_name , gslib . VERSION , <EOL> platform . python_version ( ) ) ) <EOL> self . assertIn ( ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , stderr ) <EOL> self . assertIn ( "<STR_LIT>" , stderr ) <EOL> if gslib . IS_PACKAGE_INSTALL : <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> else : <EOL> self . assertRegexpMatches ( stdout , r'<STR_LIT>' ) <EOL> self . assertIn ( '<STR_LIT>' % gslib . VERSION , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) <EOL> self . assertIn ( '<STR_LIT>' , stdout ) </s>
