refactor(paths): remove cwd-based mapping path fallbacks
This commit is contained in:
1 parent
37f736c158
commit
de21921d03
5 files changed
+57
-9
No files matched your search
@@ -128,6 +128,25 @@ class TestMappingUtils:
|
||||
|
||||
assert callable(parse_entries)
|
||||
|
||||
def test_load_reservations_prefers_path_config(self):
|
||||
import inspect
|
||||
from gui.components import mapping_utils
|
||||
|
||||
src = inspect.getsource(mapping_utils.load_reservations)
|
||||
assert "path_config.get_reservations_path()" in src
|
||||
assert "os.getcwd()" not in src
|
||||
|
||||
|
||||
class TestMappingTablePaths:
|
||||
def test_mapping_table_no_cwd_fallback(self):
|
||||
import inspect
|
||||
from gui.components import mapping_table
|
||||
|
||||
src = inspect.getsource(mapping_table.create_mapping_tab)
|
||||
assert "path_config.get_project_root()" in src
|
||||
assert "path_config.get_reservations_path()" in src
|
||||
assert "os.getcwd()" not in src
|
||||
|
||||
|
||||
class TestGuiComponentsModules:
|
||||
"""gui/components 模块存在性测试。"""
|
||||
|
||||
Reference in new issue
Block a user