@@ -252,7 +252,6 @@ def test_config_creation():
252252 assert config .dispatch_priority == None
253253 assert config .mcad == True
254254 assert config .local_interactive == False
255-
256255
257256
258257def test_cluster_creation (mocker ):
@@ -262,7 +261,8 @@ def test_cluster_creation(mocker):
262261 assert filecmp .cmp (
263262 "unit-test-cluster.yaml" , f"{ parent } /tests/test-case.yaml" , shallow = True
264263 )
265-
264+
265+
266266def test_create_app_wrapper_raises_error_with_no_image ():
267267 config = createClusterConfig ()
268268 config .image = "" # Clear the image to test error handling
@@ -271,8 +271,9 @@ def test_create_app_wrapper_raises_error_with_no_image():
271271 cluster .create_app_wrapper ()
272272 assert False , "Expected ValueError when 'image' is not specified."
273273 except ValueError as error :
274- assert str (error ) == "Image must be specified in the ClusterConfiguration" , \
275- "Error message did not match expected output."
274+ assert (
275+ str (error ) == "Image must be specified in the ClusterConfiguration"
276+ ), "Error message did not match expected output."
276277
277278
278279def test_cluster_creation_no_mcad (mocker ):
@@ -748,7 +749,13 @@ def test_ray_details(mocker, capsys):
748749 "codeflare_sdk.cluster.cluster.Cluster.cluster_dashboard_uri" ,
749750 return_value = "" ,
750751 )
751- cf = Cluster (ClusterConfiguration (name = "raytest2" , namespace = "ns" , image = "quay.io/project-codeflare/ray:latest-py39-cu118" ))
752+ cf = Cluster (
753+ ClusterConfiguration (
754+ name = "raytest2" ,
755+ namespace = "ns" ,
756+ image = "quay.io/project-codeflare/ray:latest-py39-cu118" ,
757+ )
758+ )
752759 captured = capsys .readouterr ()
753760 ray2 = _copy_to_ray (cf )
754761 details = cf .details ()
@@ -1914,7 +1921,13 @@ def test_cluster_status(mocker):
19141921 head_mem = 8 ,
19151922 head_gpu = 0 ,
19161923 )
1917- cf = Cluster (ClusterConfiguration (name = "test" , namespace = "ns" , image = "quay.io/project-codeflare/ray:latest-py39-cu118" ))
1924+ cf = Cluster (
1925+ ClusterConfiguration (
1926+ name = "test" ,
1927+ namespace = "ns" ,
1928+ image = "quay.io/project-codeflare/ray:latest-py39-cu118" ,
1929+ )
1930+ )
19181931 mocker .patch ("codeflare_sdk.cluster.cluster._app_wrapper_status" , return_value = None )
19191932 mocker .patch ("codeflare_sdk.cluster.cluster._ray_cluster_status" , return_value = None )
19201933 status , ready = cf .status ()
@@ -2004,7 +2017,13 @@ def test_wait_ready(mocker, capsys):
20042017 mock_response = mocker .Mock ()
20052018 mock_response .status_code = 200
20062019 mocker .patch ("requests.get" , return_value = mock_response )
2007- cf = Cluster (ClusterConfiguration (name = "test" , namespace = "ns" , image = "quay.io/project-codeflare/ray:latest-py39-cu118" ))
2020+ cf = Cluster (
2021+ ClusterConfiguration (
2022+ name = "test" ,
2023+ namespace = "ns" ,
2024+ image = "quay.io/project-codeflare/ray:latest-py39-cu118" ,
2025+ )
2026+ )
20082027 try :
20092028 cf .wait_ready (timeout = 5 )
20102029 assert 1 == 0
@@ -2669,7 +2688,13 @@ def test_gen_app_wrapper_with_oauth(mocker: MockerFixture):
26692688 mocker .patch (
26702689 "codeflare_sdk.utils.generate_yaml.write_user_appwrapper" , write_user_appwrapper
26712690 )
2672- Cluster (ClusterConfiguration ("test_cluster" , openshift_oauth = True , image = "quay.io/project-codeflare/ray:latest-py39-cu118" ))
2691+ Cluster (
2692+ ClusterConfiguration (
2693+ "test_cluster" ,
2694+ openshift_oauth = True ,
2695+ image = "quay.io/project-codeflare/ray:latest-py39-cu118" ,
2696+ )
2697+ )
26732698 user_yaml = write_user_appwrapper .call_args .args [0 ]
26742699 assert any (
26752700 container ["name" ] == "oauth-proxy"
0 commit comments