@@ -9,11 +9,10 @@ def _config(community_cloud=None) -> VastAIConfig:
99
1010
1111def test_vastai_compute_enables_community_cloud_by_default ():
12- with patch (
13- "dstack._internal.core.backends.vastai.compute.VastAIProvider"
14- ) as vast_provider_cls , patch (
15- "dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
16- ) as catalog_cls :
12+ with (
13+ patch ("dstack._internal.core.backends.vastai.compute.VastAIProvider" ) as vast_provider_cls ,
14+ patch ("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog" ) as catalog_cls ,
15+ ):
1716 catalog_instance = catalog_cls .return_value
1817 VastAICompute (_config ())
1918 vast_provider_cls .assert_called_once ()
@@ -22,11 +21,10 @@ def test_vastai_compute_enables_community_cloud_by_default():
2221
2322
2423def test_vastai_compute_can_enable_community_cloud ():
25- with patch (
26- "dstack._internal.core.backends.vastai.compute.VastAIProvider"
27- ) as vast_provider_cls , patch (
28- "dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
29- ) as catalog_cls :
24+ with (
25+ patch ("dstack._internal.core.backends.vastai.compute.VastAIProvider" ) as vast_provider_cls ,
26+ patch ("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog" ) as catalog_cls ,
27+ ):
3028 catalog_instance = catalog_cls .return_value
3129 VastAICompute (_config (community_cloud = True ))
3230 vast_provider_cls .assert_called_once ()
@@ -35,11 +33,10 @@ def test_vastai_compute_can_enable_community_cloud():
3533
3634
3735def test_vastai_compute_can_disable_community_cloud ():
38- with patch (
39- "dstack._internal.core.backends.vastai.compute.VastAIProvider"
40- ) as vast_provider_cls , patch (
41- "dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog"
42- ) as catalog_cls :
36+ with (
37+ patch ("dstack._internal.core.backends.vastai.compute.VastAIProvider" ) as vast_provider_cls ,
38+ patch ("dstack._internal.core.backends.vastai.compute.gpuhunt.Catalog" ) as catalog_cls ,
39+ ):
4340 catalog_instance = catalog_cls .return_value
4441 VastAICompute (_config (community_cloud = False ))
4542 vast_provider_cls .assert_called_once ()
0 commit comments