fix(mma_exec): remove hardcoded C:\projects\misc\setup_*.ps1 paths — rely on PATH
This commit is contained in:
@@ -67,5 +67,29 @@ class TestArchBoundaryPhase1(unittest.TestCase):
|
||||
captured_input = mock_run.call_args[1].get('input', '')
|
||||
self.assertIn('DEPENDENCY SKELETON: mcp_client.py', captured_input)
|
||||
|
||||
def test_mma_exec_no_hardcoded_path(self):
|
||||
"""TEST 4: mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
import importlib as il
|
||||
import sys as _sys
|
||||
scripts_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'scripts'))
|
||||
if scripts_path not in _sys.path:
|
||||
_sys.path.insert(0, scripts_path)
|
||||
import mma_exec as _mma
|
||||
il.reload(_mma)
|
||||
source = inspect.getsource(_mma.execute_agent)
|
||||
self.assertNotIn('C:\\projects\\misc', source, "Hardcoded machine path must be removed from mma_exec.execute_agent")
|
||||
|
||||
def test_claude_mma_exec_no_hardcoded_path(self):
|
||||
"""TEST 5: claude_mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
import importlib as il
|
||||
import sys as _sys
|
||||
scripts_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'scripts'))
|
||||
if scripts_path not in _sys.path:
|
||||
_sys.path.insert(0, scripts_path)
|
||||
import claude_mma_exec as _cmma
|
||||
il.reload(_cmma)
|
||||
source = inspect.getsource(_cmma.execute_agent)
|
||||
self.assertNotIn('C:\\projects\\misc', source, "Hardcoded machine path must be removed from claude_mma_exec.execute_agent")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user