@@ -220,45 +220,45 @@ def test_no_mapping(self) -> None:
220220 )
221221
222222 def test_single_mapping_match (self , monkeypatch : pytest .MonkeyPatch ) -> None :
223- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files" )
223+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files" )
224224 assert resolve_db_dir (Path ("/workspace/myproject" )) == Path ("/db-files/myproject" )
225225
226226 def test_exact_root_match (self , monkeypatch : pytest .MonkeyPatch ) -> None :
227- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files" )
227+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files" )
228228 assert resolve_db_dir (Path ("/workspace" )) == Path ("/db-files" )
229229
230230 def test_no_match_falls_back (self , monkeypatch : pytest .MonkeyPatch ) -> None :
231- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files" )
231+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files" )
232232 assert resolve_db_dir (Path ("/other/myproject" )) == Path ("/other/myproject/.cocoindex_code" )
233233
234234 def test_multiple_mappings_first_wins (self , monkeypatch : pytest .MonkeyPatch ) -> None :
235- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db1,/workspace/sub: /db2" )
235+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db1,/workspace/sub= /db2" )
236236 assert resolve_db_dir (Path ("/workspace/sub/proj" )) == Path ("/db1/sub/proj" )
237237
238238 def test_multiple_mappings_second_matches (self , monkeypatch : pytest .MonkeyPatch ) -> None :
239- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db1,/other: /db2" )
239+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db1,/other= /db2" )
240240 assert resolve_db_dir (Path ("/other/proj" )) == Path ("/db2/proj" )
241241
242242 def test_no_partial_component_match (self , monkeypatch : pytest .MonkeyPatch ) -> None :
243- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files" )
243+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files" )
244244 assert resolve_db_dir (Path ("/workspace2/proj" )) == Path ("/workspace2/proj/.cocoindex_code" )
245245
246246 def test_rejects_relative_source (self , monkeypatch : pytest .MonkeyPatch ) -> None :
247- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "relative/path: /db-files" )
247+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "relative/path= /db-files" )
248248 with pytest .raises (ValueError , match = "source path must be absolute" ):
249249 resolve_db_dir (Path ("/anything" ))
250250
251251 def test_rejects_relative_target (self , monkeypatch : pytest .MonkeyPatch ) -> None :
252- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: relative/path" )
252+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= relative/path" )
253253 with pytest .raises (ValueError , match = "target path must be absolute" ):
254254 resolve_db_dir (Path ("/anything" ))
255255
256256 def test_skips_empty_entries (self , monkeypatch : pytest .MonkeyPatch ) -> None :
257- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files,,/other: /db2," )
257+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files,,/other= /db2," )
258258 assert resolve_db_dir (Path ("/other/proj" )) == Path ("/db2/proj" )
259259
260260 def test_nested_project (self , monkeypatch : pytest .MonkeyPatch ) -> None :
261- monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace: /db-files" )
261+ monkeypatch .setenv ("COCOINDEX_CODE_DB_PATH_MAPPING" , "/workspace= /db-files" )
262262 assert resolve_db_dir (Path ("/workspace/org/repo/subdir" )) == Path (
263263 "/db-files/org/repo/subdir"
264264 )
0 commit comments