checkpoint: massive refactor

This commit is contained in:
2026-02-28 09:06:45 -05:00
parent f2512c30e9
commit d36632c21a
149 changed files with 16255 additions and 17722 deletions

View File

@@ -2,7 +2,7 @@ import pytest
from scripts.mma_exec import generate_skeleton
def test_generate_skeleton():
sample_code = '''
sample_code = '''
class Calculator:
"""Performs basic math operations."""
@@ -15,26 +15,21 @@ def log_message(msg):
timestamp = "2026-02-25"
print(f"[{timestamp}] {msg}")
'''
skeleton = generate_skeleton(sample_code)
# Check that signatures are preserved
assert "class Calculator:" in skeleton
assert "def add(self, a: int, b: int) -> int:" in skeleton
assert "def log_message(msg):" in skeleton
# Check that docstrings are preserved
assert '"""Performs basic math operations."""' in skeleton
assert '"""Adds two numbers."""' in skeleton
# Check that implementation details are removed
assert "result = a + b" not in skeleton
assert "return result" not in skeleton
assert "timestamp =" not in skeleton
assert "print(" not in skeleton
# Check that bodies are replaced with ellipsis
assert "..." in skeleton
skeleton = generate_skeleton(sample_code)
# Check that signatures are preserved
assert "class Calculator:" in skeleton
assert "def add(self, a: int, b: int) -> int:" in skeleton
assert "def log_message(msg):" in skeleton
# Check that docstrings are preserved
assert '"""Performs basic math operations."""' in skeleton
assert '"""Adds two numbers."""' in skeleton
# Check that implementation details are removed
assert "result = a + b" not in skeleton
assert "return result" not in skeleton
assert "timestamp =" not in skeleton
assert "print(" not in skeleton
# Check that bodies are replaced with ellipsis
assert "..." in skeleton
if __name__ == "__main__":
pytest.main([__file__])
pytest.main([__file__])