Test suite modernization
This commit is contained in:
parent
0969f7c2f6
commit
52fdfd0347
141 changed files with 9947 additions and 4665 deletions
|
|
@ -1,32 +1,35 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Simple test to isolate drawable issue
|
||||
Refactored to use mcrfpy.step() for synchronous execution.
|
||||
"""
|
||||
"""Simple test for drawable properties"""
|
||||
import mcrfpy
|
||||
import sys
|
||||
|
||||
# Initialize scene
|
||||
test = mcrfpy.Scene("test")
|
||||
test.activate()
|
||||
mcrfpy.step(0.01)
|
||||
mcrfpy.current_scene = test
|
||||
|
||||
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}")
|
||||
bounds = frame.bounds
|
||||
print(f"Bounds: pos={bounds[0]}, size={bounds[1]}")
|
||||
|
||||
frame.move(5, 5)
|
||||
print("Move completed")
|
||||
# Test position change
|
||||
frame.x = 15
|
||||
frame.y = 15
|
||||
bounds2 = frame.bounds
|
||||
print(f"Bounds after pos change: pos={bounds2[0]}, size={bounds2[1]}")
|
||||
|
||||
frame.resize(150, 150)
|
||||
print("Resize completed")
|
||||
# Test size change
|
||||
frame.w = 150
|
||||
frame.h = 150
|
||||
bounds3 = frame.bounds
|
||||
print(f"Bounds after resize: pos={bounds3[0]}, size={bounds3[1]}")
|
||||
|
||||
print("PASS - No crash!")
|
||||
print("PASS", file=sys.stderr)
|
||||
sys.exit(0)
|
||||
except Exception as e:
|
||||
print(f"ERROR: {e}")
|
||||
print("FAIL")
|
||||
print("FAIL", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue