@@ -14,8 +14,7 @@ def test_github_verify_default():
1414
1515 from githubapi import GitHub
1616
17- gh = GitHub ()
18- gh = gh # to avoid unused variable warning
17+ _gh = GitHub ()
1918
2019 # Verify that session.verify is set to True by default
2120 assert mock_session .verify == True
@@ -30,8 +29,7 @@ def test_github_verify_false():
3029
3130 from githubapi import GitHub
3231
33- gh = GitHub (verify = False )
34- gh = gh # to avoid unused variable warning
32+ _gh = GitHub (verify = False )
3533
3634 # Verify that session.verify is set to False
3735 assert mock_session .verify == False
@@ -47,8 +45,7 @@ def test_github_verify_cert_bundle():
4745 from githubapi import GitHub
4846
4947 cert_path = "/path/to/cert.pem"
50- gh = GitHub (verify = cert_path )
51- gh = gh # to avoid unused variable warning
48+ _gh = GitHub (verify = cert_path )
5249
5350 # Verify that session.verify is set to the certificate path
5451 assert mock_session .verify == cert_path
@@ -59,17 +56,15 @@ def test_github_token_required():
5956 with patch .dict (os .environ , {}, clear = True ):
6057 with pytest .raises (ValueError , match = "GITHUB_TOKEN environment variable must be set" ):
6158 from githubapi import GitHub
62- gh = GitHub ()
63- gh = gh # to avoid unused variable warning
59+ _gh = GitHub ()
6460
6561
6662def test_github_hostname_validation ():
6763 """Test that GitHub class validates hostname."""
6864 with patch .dict (os .environ , {"GITHUB_TOKEN" : "test_token" }):
6965 with pytest .raises (ValueError , match = "Invalid server hostname" ):
7066 from githubapi import GitHub
71- gh = GitHub (hostname = "invalid hostname with spaces" )
72- gh = gh # to avoid unused variable warning
67+ _gh = GitHub (hostname = "invalid hostname with spaces" )
7368
7469if __name__ == "__main__" :
7570 pytest .main ([__file__ , "-v" ])
0 commit comments