Add API verification test suite and documentation

tests/docs/:
- API_FINDINGS.md: Comprehensive migration guide from deprecated to modern API
- test_*.py: 9 executable tests verifying actual runtime behavior
- screenshots/: Visual verification of working examples

tests/conftest.py:
- Add 'docs' and 'demo' to pytest collection paths

Key findings documented:
- Entity uses grid_pos= not pos=
- Scene API: Scene() + activate() replaces createScene/setScene
- scene.children replaces sceneUI()
- scene.on_key replaces keypressScene()
- mcrfpy.current_scene (property) replaces currentScene() (function)
- Timer callback signature: (timer, runtime)
- Opacity animation does NOT work on Frame (documented bug)

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Frick 2026-01-15 04:05:32 +00:00
commit 23afae69ad
17 changed files with 620 additions and 2 deletions

View file

@ -111,7 +111,7 @@ def pytest_collect_file(parent, file_path):
except ValueError:
return None
if rel_path.parts and rel_path.parts[0] in ('unit', 'integration', 'regression'):
if rel_path.parts and rel_path.parts[0] in ('unit', 'integration', 'regression', 'docs', 'demo'):
if file_path.suffix == '.py' and file_path.name not in ('__init__.py', 'conftest.py'):
return McRFTestFile.from_parent(parent, path=file_path)
return None
@ -121,7 +121,7 @@ def pytest_ignore_collect(collection_path, config):
"""Prevent pytest from trying to import test scripts as Python modules."""
try:
rel_path = collection_path.relative_to(TESTS_DIR)
if rel_path.parts and rel_path.parts[0] in ('unit', 'integration', 'regression'):
if rel_path.parts and rel_path.parts[0] in ('unit', 'integration', 'regression', 'docs', 'demo'):
# Let our custom collector handle these, don't import them
return False # Don't ignore - we'll collect them our way
except ValueError: