File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -366,14 +366,20 @@ def test_missing_init_py_error(hydra_restore_singletons: Any) -> None:
366366
367367
368368def test_missing_bad_config_dir_error (hydra_restore_singletons : Any ) -> None :
369+ # Use a platform-appropriate absolute path that doesn't exist
370+ if sys .platform == "win32" :
371+ bad_dir = "C:\\ no_way_in_hell_1234567890"
372+ else :
373+ bad_dir = "/no_way_in_hell_1234567890"
374+
369375 expected = (
370376 "Primary config directory not found."
371- "\n Check that the config directory '/no_way_in_hell_1234567890 ' exists and readable"
377+ f "\n Check that the config directory '{ bad_dir } ' exists and readable"
372378 )
373379
374380 with raises (Exception , match = re .escape (expected )):
375381 with initialize_config_dir (
376- config_dir = "/no_way_in_hell_1234567890" ,
382+ config_dir = bad_dir ,
377383 version_base = None ,
378384 ):
379385 hydra = GlobalHydra .instance ().hydra
You can’t perform that action at this time.
0 commit comments