@@ -95,13 +95,13 @@ def tearDown(self):
9595
9696 super (GithubTest , self ).tearDown ()
9797
98- def test_pick_default_branch (self ):
98+ def test_github_pick_default_branch (self ):
9999 """Test pick_default_branch function."""
100100
101101 self .assertEqual (pick_default_branch ('easybuilders' ), 'main' )
102102 self .assertEqual (pick_default_branch ('foobar' ), 'master' )
103103
104- def test_walk (self ):
104+ def test_github_walk (self ):
105105 """test the gitubfs walk function"""
106106 if self .skip_github_tests :
107107 print ("Skipping test_walk, no GitHub token available?" )
@@ -117,7 +117,7 @@ def test_walk(self):
117117 except IOError :
118118 pass
119119
120- def test_read_api (self ):
120+ def test_github_read_api (self ):
121121 """Test the githubfs read function"""
122122 if self .skip_github_tests :
123123 print ("Skipping test_read_api, no GitHub token available?" )
@@ -128,7 +128,7 @@ def test_read_api(self):
128128 except IOError :
129129 pass
130130
131- def test_read (self ):
131+ def test_github_read (self ):
132132 """Test the githubfs read function without using the api"""
133133 if self .skip_github_tests :
134134 print ("Skipping test_read, no GitHub token available?" )
@@ -141,7 +141,7 @@ def test_read(self):
141141 except (IOError , OSError ):
142142 pass
143143
144- def test_add_pr_labels (self ):
144+ def test_github_add_pr_labels (self ):
145145 """Test add_pr_labels function."""
146146 if self .skip_github_tests :
147147 print ("Skipping test_add_pr_labels, no GitHub token available?" )
@@ -183,7 +183,7 @@ def test_add_pr_labels(self):
183183 self .mock_stderr (False )
184184 self .assertTrue ("PR #8006 should be labelled 'update'" in stdout )
185185
186- def test_fetch_pr_data (self ):
186+ def test_github_fetch_pr_data (self ):
187187 """Test fetch_pr_data function."""
188188 if self .skip_github_tests :
189189 print ("Skipping test_fetch_pr_data, no GitHub token available?" )
@@ -205,7 +205,7 @@ def test_fetch_pr_data(self):
205205 self .assertEqual (pr_data ['reviews' ][0 ]['user' ]['login' ], 'boegel' )
206206 self .assertEqual (pr_data ['status_last_commit' ], None )
207207
208- def test_list_prs (self ):
208+ def test_github_list_prs (self ):
209209 """Test list_prs function."""
210210 if self .skip_github_tests :
211211 print ("Skipping test_list_prs, no GitHub token available?" )
@@ -227,7 +227,7 @@ def test_list_prs(self):
227227
228228 self .assertEqual (expected , output )
229229
230- def test_reasons_for_closing (self ):
230+ def test_github_reasons_for_closing (self ):
231231 """Test reasons_for_closing function."""
232232 if self .skip_github_tests :
233233 print ("Skipping test_reasons_for_closing, no GitHub token available?" )
@@ -267,7 +267,7 @@ def test_reasons_for_closing(self):
267267 for pattern in patterns :
268268 self .assertTrue (pattern in stdout , "Pattern '%s' found in: %s" % (pattern , stdout ))
269269
270- def test_close_pr (self ):
270+ def test_github_close_pr (self ):
271271 """Test close_pr function."""
272272 if self .skip_github_tests :
273273 print ("Skipping test_close_pr, no GitHub token available?" )
@@ -312,7 +312,7 @@ def test_close_pr(self):
312312 for pattern in patterns :
313313 self .assertTrue (pattern in stdout , "Pattern '%s' found in: %s" % (pattern , stdout ))
314314
315- def test_fetch_easyblocks_from_pr (self ):
315+ def test_github_fetch_easyblocks_from_pr (self ):
316316 """Test fetch_easyblocks_from_pr function."""
317317 if self .skip_github_tests :
318318 print ("Skipping test_fetch_easyblocks_from_pr, no GitHub token available?" )
@@ -339,7 +339,7 @@ def test_fetch_easyblocks_from_pr(self):
339339 except URLError as err :
340340 print ("Ignoring URLError '%s' in test_fetch_easyblocks_from_pr" % err )
341341
342- def test_fetch_easyconfigs_from_pr (self ):
342+ def test_github_fetch_easyconfigs_from_pr (self ):
343343 """Test fetch_easyconfigs_from_pr function."""
344344 if self .skip_github_tests :
345345 print ("Skipping test_fetch_easyconfigs_from_pr, no GitHub token available?" )
@@ -390,7 +390,7 @@ def test_fetch_easyconfigs_from_pr(self):
390390 except URLError as err :
391391 print ("Ignoring URLError '%s' in test_fetch_easyconfigs_from_pr" % err )
392392
393- def test_fetch_files_from_pr_cache (self ):
393+ def test_github_fetch_files_from_pr_cache (self ):
394394 """Test caching for fetch_files_from_pr."""
395395 if self .skip_github_tests :
396396 print ("Skipping test_fetch_files_from_pr_cache, no GitHub token available?" )
@@ -451,7 +451,7 @@ def test_fetch_files_from_pr_cache(self):
451451 res = gh .fetch_easyblocks_from_pr (12345 , tmpdir )
452452 self .assertEqual (sorted (pr12345_files ), sorted (res ))
453453
454- def test_fetch_latest_commit_sha (self ):
454+ def test_github_fetch_latest_commit_sha (self ):
455455 """Test fetch_latest_commit_sha function."""
456456 if self .skip_github_tests :
457457 print ("Skipping test_fetch_latest_commit_sha, no GitHub token available?" )
@@ -463,7 +463,7 @@ def test_fetch_latest_commit_sha(self):
463463 branch = 'develop' )
464464 self .assertTrue (re .match ('^[0-9a-f]{40}$' , sha ))
465465
466- def test_download_repo (self ):
466+ def test_github_download_repo (self ):
467467 """Test download_repo function."""
468468 if self .skip_github_tests :
469469 print ("Skipping test_download_repo, no GitHub token available?" )
@@ -562,7 +562,7 @@ def test_validate_github_token(self):
562562 if token_old_format :
563563 self .assertTrue (gh .validate_github_token (token_old_format , GITHUB_TEST_ACCOUNT ))
564564
565- def test_find_easybuild_easyconfig (self ):
565+ def test_github_find_easybuild_easyconfig (self ):
566566 """Test for find_easybuild_easyconfig function"""
567567 if self .skip_github_tests :
568568 print ("Skipping test_find_easybuild_easyconfig, no GitHub token available?" )
@@ -573,7 +573,7 @@ def test_find_easybuild_easyconfig(self):
573573 self .assertTrue (regex .search (path ), "Pattern '%s' found in '%s'" % (regex .pattern , path ))
574574 self .assertTrue (os .path .exists (path ), "Path %s exists" % path )
575575
576- def test_find_patches (self ):
576+ def test_github_find_patches (self ):
577577 """ Test for find_software_name_for_patch """
578578 test_dir = os .path .dirname (os .path .abspath (__file__ ))
579579 ec_path = os .path .join (test_dir , 'easyconfigs' )
@@ -595,7 +595,7 @@ def test_find_patches(self):
595595 reg = re .compile (r'[1-9]+ of [1-9]+ easyconfigs checked' )
596596 self .assertTrue (re .search (reg , txt ))
597597
598- def test_det_commit_status (self ):
598+ def test_github_det_commit_status (self ):
599599 """Test det_commit_status function."""
600600
601601 if self .skip_github_tests :
@@ -642,7 +642,7 @@ def test_det_commit_status(self):
642642 res = gh .det_commit_status ('easybuilders' , GITHUB_REPO , commit_sha , GITHUB_TEST_ACCOUNT )
643643 self .assertEqual (res , None )
644644
645- def test_check_pr_eligible_to_merge (self ):
645+ def test_github_check_pr_eligible_to_merge (self ):
646646 """Test check_pr_eligible_to_merge function"""
647647 def run_check (expected_result = False ):
648648 """Helper function to check result of check_pr_eligible_to_merge"""
@@ -770,7 +770,7 @@ def run_check(expected_result=False):
770770 expected_warning = ''
771771 self .assertEqual (run_check (True ), '' )
772772
773- def test_det_pr_labels (self ):
773+ def test_github_det_pr_labels (self ):
774774 """Test for det_pr_labels function."""
775775
776776 file_info = {'new_folder' : [False ], 'new_file_in_existing_folder' : [True ]}
@@ -789,7 +789,7 @@ def test_det_pr_labels(self):
789789 res = gh .det_pr_labels (file_info , GITHUB_EASYBLOCKS_REPO )
790790 self .assertEqual (res , ['new' ])
791791
792- def test_det_patch_specs (self ):
792+ def test_github_det_patch_specs (self ):
793793 """Test for det_patch_specs function."""
794794
795795 patch_paths = [os .path .join (self .test_prefix , p ) for p in ['1.patch' , '2.patch' , '3.patch' ]]
@@ -841,7 +841,7 @@ def test_det_patch_specs(self):
841841 self .assertEqual (os .path .basename (res [2 ][0 ]), '3.patch' )
842842 self .assertEqual (res [2 ][1 ], 'patched_ext' )
843843
844- def test_restclient (self ):
844+ def test_github_restclient (self ):
845845 """Test use of RestClient."""
846846 if self .skip_github_tests :
847847 print ("Skipping test_restclient, no GitHub token available?" )
@@ -876,7 +876,7 @@ def test_restclient(self):
876876 httperror_hit = True
877877 self .assertTrue (httperror_hit , "expected HTTPError not encountered" )
878878
879- def test_create_delete_gist (self ):
879+ def test_github_create_delete_gist (self ):
880880 """Test create_gist and delete_gist."""
881881 if self .skip_github_tests :
882882 print ("Skipping test_restclient, no GitHub token available?" )
@@ -888,7 +888,7 @@ def test_create_delete_gist(self):
888888 gist_id = gist_url .split ('/' )[- 1 ]
889889 gh .delete_gist (gist_id , github_user = GITHUB_TEST_ACCOUNT , github_token = self .github_token )
890890
891- def test_det_account_branch_for_pr (self ):
891+ def test_github_det_account_branch_for_pr (self ):
892892 """Test det_account_branch_for_pr."""
893893 if self .skip_github_tests :
894894 print ("Skipping test_det_account_branch_for_pr, no GitHub token available?" )
@@ -918,7 +918,7 @@ def test_det_account_branch_for_pr(self):
918918 self .assertEqual (account , 'migueldiascosta' )
919919 self .assertEqual (branch , 'fix_inject_checksums' )
920920
921- def test_det_pr_target_repo (self ):
921+ def test_github_det_pr_target_repo (self ):
922922 """Test det_pr_target_repo."""
923923
924924 self .assertEqual (build_option ('pr_target_repo' ), None )
@@ -1005,7 +1005,7 @@ def test_push_branch_to_github(self):
10051005 regex = re .compile (pattern )
10061006 self .assertTrue (regex .match (stdout .strip ()), "Pattern '%s' doesn't match: %s" % (regex .pattern , stdout ))
10071007
1008- def test_pr_test_report (self ):
1008+ def test_github_pr_test_report (self ):
10091009 """Test for post_pr_test_report function."""
10101010 if self .skip_github_tests :
10111011 print ("Skipping test_post_pr_test_report, no GitHub token available?" )
@@ -1075,7 +1075,7 @@ def test_pr_test_report(self):
10751075 regex = re .compile (pattern , re .M )
10761076 self .assertTrue (regex .search (stdout ), "Pattern '%s' should be found in: %s" % (regex .pattern , stdout ))
10771077
1078- def test_create_test_report (self ):
1078+ def test_github_create_test_report (self ):
10791079 """Test create_test_report function."""
10801080 logfile = os .path .join (self .test_prefix , 'log.txt' )
10811081 write_file (logfile , "Bazel failed with: error" )
0 commit comments