Refactor 11 more tests to mcrfpy.step() pattern
Converted from Timer-based async to step()-based sync: - test_simple_callback.py - test_empty_animation_manager.py - test_frame_clipping.py - test_frame_clipping_advanced.py - test_grid_children.py - test_color_helpers.py - test_no_arg_constructors.py - test_properties_quick.py - test_simple_drawable.py - test_python_object_cache.py - WORKING_automation_test_example.py Only 4 tests remain with Timer-based patterns (2 are headless detection tests that may require special handling). 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Frack <frack@goblincorps.dev> Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bb86cece2b
commit
be450286f8
12 changed files with 867 additions and 866 deletions
|
|
@ -1,30 +1,32 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Simple test to isolate drawable issue"""
|
||||
"""Simple test to isolate drawable issue
|
||||
Refactored to use mcrfpy.step() for synchronous execution.
|
||||
"""
|
||||
import mcrfpy
|
||||
import sys
|
||||
|
||||
def simple_test(timer, runtime):
|
||||
timer.stop()
|
||||
|
||||
try:
|
||||
# Test basic functionality
|
||||
frame = mcrfpy.Frame(pos=(10, 10), size=(100, 100))
|
||||
print(f"Frame created: visible={frame.visible}, opacity={frame.opacity}")
|
||||
|
||||
bounds = frame.get_bounds()
|
||||
print(f"Bounds: {bounds}")
|
||||
|
||||
frame.move(5, 5)
|
||||
print("Move completed")
|
||||
|
||||
frame.resize(150, 150)
|
||||
print("Resize completed")
|
||||
|
||||
print("PASS - No crash!")
|
||||
except Exception as e:
|
||||
print(f"ERROR: {e}")
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
# Initialize scene
|
||||
test = mcrfpy.Scene("test")
|
||||
simple_test_timer = mcrfpy.Timer("simple_test", simple_test, 100, once=True)
|
||||
test.activate()
|
||||
mcrfpy.step(0.01)
|
||||
|
||||
try:
|
||||
# Test basic functionality
|
||||
frame = mcrfpy.Frame(pos=(10, 10), size=(100, 100))
|
||||
print(f"Frame created: visible={frame.visible}, opacity={frame.opacity}")
|
||||
|
||||
bounds = frame.get_bounds()
|
||||
print(f"Bounds: {bounds}")
|
||||
|
||||
frame.move(5, 5)
|
||||
print("Move completed")
|
||||
|
||||
frame.resize(150, 150)
|
||||
print("Resize completed")
|
||||
|
||||
print("PASS - No crash!")
|
||||
sys.exit(0)
|
||||
except Exception as e:
|
||||
print(f"ERROR: {e}")
|
||||
print("FAIL")
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue