@@ -16,7 +16,7 @@ def test_tar_single(self):
1616 upload_command = ["shed_upload" , "--tar_only" ]
1717 upload_command .extend (self ._shed_args ())
1818 self ._check_exit_code (upload_command )
19- _assert_exists (join (f , "shed_upload.tar.gz" ))
19+ assert_exists (join (f , "shed_upload.tar.gz" ))
2020
2121 def test_upload_not_exists (self ):
2222 with self ._isolate_repo ("single_tool" ):
@@ -68,7 +68,7 @@ def test_upload_filters_invalid_suite(self):
6868 self ._check_exit_code (upload_command )
6969 target = self ._untar (f , "shed_upload.tar.gz" )
7070 # Only one file was in archive
71- _assert_exists (join (target , "repository_dependencies.xml" ))
71+ assert_exists (join (target , "repository_dependencies.xml" ))
7272 # this got filtered
7373 assert not exists (join (target , "README.rst" ))
7474
@@ -79,7 +79,7 @@ def test_upload_suite_auto(self):
7979 self ._check_exit_code (upload_command )
8080 target = self ._untar (f , "shed_upload_suite_1.tar.gz" )
8181 # Only one file was in archive
82- _assert_exists (join (target , "repository_dependencies.xml" ))
82+ assert_exists (join (target , "repository_dependencies.xml" ))
8383
8484 def test_upload_filters_ignore (self ):
8585 with self ._isolate_repo ("single_tool_exclude" ) as f :
@@ -120,7 +120,7 @@ def test_upload_filters_invalid_package(self):
120120 self ._check_exit_code (upload_command )
121121 target = self ._untar (f , "shed_upload.tar.gz" )
122122 # Only one file was in archive
123- _assert_exists (join (target , "tool_dependencies.xml" ))
123+ assert_exists (join (target , "tool_dependencies.xml" ))
124124 # this got filtered
125125 assert not exists (join (target , "README.rst" ))
126126 # .shed.yml always gets filtered
@@ -133,8 +133,8 @@ def test_upload_not_filters_unrestricted(self):
133133 self ._check_exit_code (upload_command )
134134 target = self ._untar (f , "shed_upload.tar.gz" )
135135 # Only one file was in archive
136- _assert_exists (join (target , "repository_dependencies.xml" ))
137- _assert_exists (join (target , "README.rst" ))
136+ assert_exists (join (target , "repository_dependencies.xml" ))
137+ assert_exists (join (target , "README.rst" ))
138138
139139 def test_upload_expansion_configured (self ):
140140 with self ._isolate_repo ("multi_repos_flat_configured" ) as f :
@@ -205,15 +205,15 @@ def _verify_single_uploaded(self, f):
205205 def _verify_upload (self , f , download_files = [], download_args = []):
206206 target = self ._download_repo (f , download_args )
207207 for download_file in download_files :
208- _assert_exists (join (target , download_file ))
208+ assert_exists (join (target , download_file ))
209209 return target
210210
211211 def _check_tar (self , f , tar_path , contains = [], not_contains = []):
212212 tar_path = join (f , tar_path )
213- _assert_exists (tar_path )
213+ assert_exists (tar_path )
214214 target = self ._untar (f , tar_path )
215215 for path in contains :
216- _assert_exists (join (target , path ))
216+ assert_exists (join (target , path ))
217217 for path in not_contains :
218218 assert not exists (join (target , path ))
219219 return target
@@ -224,7 +224,7 @@ def _download_repo(self, f, download_args=[]):
224224 download_command .extend (self ._shed_args (read_only = True ))
225225 self ._check_exit_code (download_command )
226226 download = join (f , "shed_download.tar.gz" )
227- _assert_exists (download )
227+ assert_exists (download )
228228 return self ._untar (f , "shed_download.tar.gz" , tarbomb = False )
229229
230230 def _untar (self , f , path , tarbomb = True ):
@@ -247,7 +247,7 @@ def _untar(self, f, path, tarbomb=True):
247247 return target
248248
249249
250- def _assert_exists (path ):
250+ def assert_exists (path ):
251251 dir_path = os .path .dirname (path )
252252 msg = None
253253 if not exists (dir_path ):
0 commit comments