|
13 | 13 | try:
|
14 | 14 | import IPython
|
15 | 15 | import ipywidgets
|
| 16 | + |
16 | 17 | WIDGET_DEPS_AVAILABLE = True
|
17 | 18 | except ImportError:
|
18 | 19 | WIDGET_DEPS_AVAILABLE = False
|
@@ -68,7 +69,9 @@ def test_cloud_provider_field_mapping(self):
|
68 | 69 | assert "hf_hardware" in hf_config
|
69 | 70 | assert "hf_sdk" in hf_config
|
70 | 71 |
|
71 |
| - @pytest.mark.skipif(not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available") |
| 72 | + @pytest.mark.skipif( |
| 73 | + not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available" |
| 74 | + ) |
72 | 75 | def test_widget_safe_value_setting(self):
|
73 | 76 | """Test that widget safely handles values not in dropdown options."""
|
74 | 77 | widget = ClusterConfigWidget(auto_display=False)
|
@@ -99,7 +102,9 @@ def test_widget_safe_value_setting(self):
|
99 | 102 | assert widget.azure_region.value in widget.azure_region.options
|
100 | 103 | assert widget.azure_instance_type.value in widget.azure_instance_type.options
|
101 | 104 |
|
102 |
| - @pytest.mark.skipif(not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available") |
| 105 | + @pytest.mark.skipif( |
| 106 | + not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available" |
| 107 | + ) |
103 | 108 | def test_widget_save_load_cycle(self):
|
104 | 109 | """Test that widget can save and load configurations correctly."""
|
105 | 110 | widget = ClusterConfigWidget(auto_display=False)
|
@@ -191,7 +196,9 @@ def test_cloud_provider_fields_in_config(self):
|
191 | 196 | assert hf_config.hf_username == "test-user"
|
192 | 197 | assert hf_config.hf_sdk == "gradio"
|
193 | 198 |
|
194 |
| - @pytest.mark.skipif(not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available") |
| 199 | + @pytest.mark.skipif( |
| 200 | + not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available" |
| 201 | + ) |
195 | 202 | def test_widget_dropdown_population(self):
|
196 | 203 | """Test that widget properly populates dropdown options."""
|
197 | 204 | widget = ClusterConfigWidget(auto_display=False)
|
@@ -228,7 +235,9 @@ def test_no_name_description_in_default_configs(self):
|
228 | 235 | "description" not in test_config
|
229 | 236 | ), f"Config '{config_name}' should not have 'description' field initially"
|
230 | 237 |
|
231 |
| - @pytest.mark.skipif(not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available") |
| 238 | + @pytest.mark.skipif( |
| 239 | + not WIDGET_DEPS_AVAILABLE, reason="Widget dependencies not available" |
| 240 | + ) |
232 | 241 | def test_widget_cluster_type_change_updates_options(self):
|
233 | 242 | """Test that changing cluster type updates dropdown options."""
|
234 | 243 | widget = ClusterConfigWidget(auto_display=False)
|
|
0 commit comments