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:
parent
be450286f8
commit
23afae69ad
17 changed files with 620 additions and 2 deletions
18
tests/docs/test_current_scene.py
Normal file
18
tests/docs/test_current_scene.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Verify mcrfpy.current_scene property."""
|
||||
import mcrfpy
|
||||
import sys
|
||||
|
||||
scene = mcrfpy.Scene("test")
|
||||
scene.activate()
|
||||
mcrfpy.step(0.1)
|
||||
|
||||
try:
|
||||
current = mcrfpy.current_scene
|
||||
print(f"mcrfpy.current_scene = {current}")
|
||||
print(f"type: {type(current)}")
|
||||
print("VERIFIED: mcrfpy.current_scene WORKS")
|
||||
except AttributeError as e:
|
||||
print(f"FAILED: {e}")
|
||||
|
||||
sys.exit(0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue