Refactor timing tests to use mcrfpy.step() for synchronous execution
Converts tests from Timer-based async patterns to step()-based sync patterns, eliminating timeout issues in headless testing. Refactored tests: - simple_timer_screenshot_test.py - test_animation_callback_simple.py - test_animation_property_locking.py - test_animation_raii.py - test_animation_removal.py - test_timer_callback.py Also updates KNOWN_ISSUES.md with comprehensive documentation on the step()-based testing pattern including examples and best practices. 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f063d0af0c
commit
4528ece0a7
7 changed files with 325 additions and 290 deletions
|
|
@ -210,7 +210,7 @@ def test_8_replace_completes_old():
|
|||
test_result("Replace completes old animation", False, str(e))
|
||||
|
||||
|
||||
def run_all_tests(timer, runtime):
|
||||
def run_all_tests():
|
||||
"""Run all property locking tests"""
|
||||
print("\nRunning Animation Property Locking Tests...")
|
||||
print("-" * 50)
|
||||
|
|
@ -245,5 +245,8 @@ def run_all_tests(timer, runtime):
|
|||
test = mcrfpy.Scene("test")
|
||||
test.activate()
|
||||
|
||||
# Start tests after a brief delay to allow scene to initialize
|
||||
mcrfpy.Timer("start", run_all_tests, 100, once=True)
|
||||
# Use mcrfpy.step() to advance simulation for scene initialization
|
||||
mcrfpy.step(0.1) # Brief step to initialize scene
|
||||
|
||||
# Run tests directly (no timer needed with step-based approach)
|
||||
run_all_tests()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue