@@ -108,11 +108,12 @@ def tearDownModule():
108108class TestClient (unittest .TestCase ):
109109 @classmethod
110110 def setUpClass (cls ):
111+ super (TestClient , cls ).setUpClass ()
111112 if (
112113 type (Config .CLIENT ._credentials )
113114 is not google .oauth2 .service_account .Credentials
114115 ):
115- cls .skipTest ("These tests require a service account credential" )
116+ cls .skipTest (cls , reason = "These tests require a service account credential" )
116117
117118 def setUp (self ):
118119 self .case_hmac_keys_to_delete = []
@@ -578,11 +579,12 @@ class TestStorageWriteFiles(TestStorageFiles):
578579
579580 @classmethod
580581 def setUpClass (cls ):
582+ super (TestStorageWriteFiles , cls ).setUpClass ()
581583 if (
582584 type (Config .CLIENT ._credentials )
583585 is not google .oauth2 .service_account .Credentials
584586 ):
585- cls .skipTest ("These tests require a service account credential" )
587+ cls .skipTest (cls , reason = "These tests require a service account credential" )
586588
587589 def test_large_file_write_from_stream (self ):
588590 blob = self .bucket .blob ("LargeFile" )
@@ -1293,11 +1295,14 @@ class TestStorageSignURLs(unittest.TestCase):
12931295
12941296 @classmethod
12951297 def setUpClass (cls ):
1298+ super (TestStorageSignURLs , cls ).setUpClass ()
12961299 if (
12971300 type (Config .CLIENT ._credentials )
12981301 is not google .oauth2 .service_account .Credentials
12991302 ):
1300- cls .skipTest ("Signing tests requires a service account credential" )
1303+ cls .skipTest (
1304+ cls , reason = "Signing tests requires a service account credential"
1305+ )
13011306
13021307 bucket_name = "gcp-signing" + unique_resource_id ()
13031308 cls .bucket = retry_429_503 (Config .CLIENT .create_bucket )(bucket_name )
@@ -1860,8 +1865,9 @@ class TestStorageNotificationCRUD(unittest.TestCase):
18601865
18611866 @classmethod
18621867 def setUpClass (cls ):
1868+ super (TestStorageNotificationCRUD , cls ).setUpClass ()
18631869 if Config .TESTING_MTLS :
1864- cls .skipTest ("Skip pubsub tests for mTLS testing" )
1870+ cls .skipTest (cls , reason = "Skip pubsub tests for mTLS testing" )
18651871
18661872 @property
18671873 def topic_path (self ):
@@ -2025,9 +2031,10 @@ def _kms_key_name(self, key_name=None):
20252031
20262032 @classmethod
20272033 def setUpClass (cls ):
2028- if Config .TESTING_MTLS :
2029- cls .skipTest ("Skip kms tests for mTLS testing" )
20302034 super (TestKMSIntegration , cls ).setUpClass ()
2035+ if Config .TESTING_MTLS :
2036+ cls .skipTest (cls , reason = "Skip kms tests for mTLS testing" )
2037+
20312038 _empty_bucket (Config .CLIENT , cls .bucket )
20322039
20332040 def setUp (self ):
@@ -2483,11 +2490,12 @@ def test_ubla_set_unset_preserves_acls(self):
24832490class TestV4POSTPolicies (unittest .TestCase ):
24842491 @classmethod
24852492 def setUpClass (cls ):
2493+ super (TestV4POSTPolicies , cls ).setUpClass ()
24862494 if (
24872495 type (Config .CLIENT ._credentials )
24882496 is not google .oauth2 .service_account .Credentials
24892497 ):
2490- cls .skipTest ("These tests require a service account credential" )
2498+ cls .skipTest (cls , reason = "These tests require a service account credential" )
24912499
24922500 def setUp (self ):
24932501 self .case_buckets_to_delete = []
0 commit comments