Compare commits

..
Author SHA1 Message Date
praisonai-triage-agent[bot]andMervin Praison ccc4058b17 revert: restore intentional defects in ai_code_editor_fixture
The AI code-editor smoke-test fixture is intentionally broken so live
scenarios (implement celsius_to_fahrenheit / fahrenheit_to_celsius / mode,
fix mean/median empty-list handling) exercise the AI editor's repair
capability. Pre-implementing these functions caused acceptance tests to
pass WITHOUT the editor doing any work, defeating the fixture's purpose.

Also removes the redundant conftest.py sys.path mutation; pyproject.toml
already sets pythonpath = ["src"].

Co-authored-by: Mervin Praison <[email protected]>
2026-08-19 09:20:28 +00:00
ugbotueferhire dc2e931eb7 fix: implement missing mathlib functions 2026-08-19 10:15:46 +01:00
2 changed files with 5 additions and 11 deletions

No files matched your search

@@ -2,7 +2,6 @@
Tests for custom agent and command definitions discovery.
"""
import sys
import tempfile
from pathlib import Path
from unittest.mock import patch
@@ -228,9 +227,8 @@ class TestShellSubstitution:
"""With allow_shell=True the command runs and stdout is inlined."""
template = "Output: !`echo hello world`"
result = TemplateInterpolator.interpolate(template, allow_shell=True)
assert result.strip() == "Output: hello world"
assert result == "Output: hello world"
@pytest.mark.skipif(sys.platform == "win32", reason="Unix commands not available on Windows")
def test_shell_runs_in_working_dir(self):
"""Commands execute in the provided working_dir."""
with tempfile.TemporaryDirectory() as tmpdir:
@@ -247,7 +245,6 @@ class TestShellSubstitution:
with pytest.raises(ShellSubstitutionError):
TemplateInterpolator.interpolate(template, allow_shell=True)
@pytest.mark.skipif(sys.platform == "win32", reason="Unix commands not available on Windows")
def test_shell_output_capped_at_max_bytes(self):
"""Large stdout is bounded to SHELL_SUBSTITUTION_MAX_BYTES while reading."""
from praisonai.cli.features.custom_definitions import (
@@ -283,7 +280,7 @@ class TestShellSubstitution:
CustomDefinitionsDiscovery, '_find_project_dirs', return_value=[Path(tmpdir)]
), patch.dict("os.environ", {SHELL_SUBSTITUTION_ENV: "true"}):
result = interpolate_command_template("diff")
assert result.strip() == "Output: hi"
assert result == "Output: hi"
def test_frontmatter_allow_shell_enables(self):
"""allow_shell: true frontmatter enables substitution for that command."""
@@ -304,7 +301,7 @@ class TestShellSubstitution:
import os as _os
_os.environ.pop(SHELL_SUBSTITUTION_ENV, None)
result = interpolate_command_template("diff")
assert result.strip() == "Output: hey"
assert result == "Output: hey"
def test_default_command_disables_shell(self):
"""Without any gate, a !`cmd` command raises a clear error."""
@@ -349,7 +346,6 @@ class TestShellSubstitution:
)
assert "\\$(rm -rf /)" in result
@pytest.mark.skipif(sys.platform == "win32", reason="Unix commands not available on Windows")
def test_shell_output_with_dollar_not_mangled(self):
"""Command stdout containing $(...) is inlined verbatim, not escaped."""
template = "Out: !`printf '%s' '$(git rev-parse HEAD)'`"
@@ -3,8 +3,9 @@ TDD Tests for Hybrid Workflow Executor (Strategy 6).
Tests the HybridWorkflowExecutor that combines job and agent workflow capabilities.
"""
import sys
import pytest
import tempfile
from pathlib import Path
from unittest.mock import Mock, patch
@@ -140,7 +141,6 @@ class TestHybridWorkflowDryRun:
class TestHybridWorkflowExecution:
"""Test actual execution of hybrid workflow steps."""
@pytest.mark.skipif(sys.platform == "win32", reason="echo command not available on Windows")
def test_execute_shell_step(self):
"""Shell step should execute correctly."""
from praisonai.cli.features.hybrid_workflow import HybridWorkflowExecutor
@@ -157,7 +157,6 @@ class TestHybridWorkflowExecution:
assert result["ok"] is True
assert result["results"][0]["status"] == "ok"
@pytest.mark.skipif(sys.platform == "win32", reason="echo command not available on Windows")
def test_execute_parallel_shell_steps(self):
"""Parallel shell steps should execute correctly."""
from praisonai.cli.features.hybrid_workflow import HybridWorkflowExecutor
@@ -180,7 +179,6 @@ class TestHybridWorkflowExecution:
assert result["ok"] is True
assert result["results"][0]["status"] == "ok"
def test_execute_agent_step_with_mock(self):
"""Agent step should execute with mocked Agent."""
from praisonai.cli.features.hybrid_workflow import HybridWorkflowExecutor