Organize test suite: add README, move loose tests to proper directories
- Add tests/README.md documenting test structure and usage - Move issue_*_test.py files to tests/regression/ (9 files) - Move loose test_*.py files to tests/unit/ (18 files) - tests/ root now contains only pytest infrastructure Addresses #166 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a4217b49d7
commit
165db91b8d
28 changed files with 174 additions and 0 deletions
43
tests/unit/test_frame_bounds.py
Normal file
43
tests/unit/test_frame_bounds.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Test Frame bounds"""
|
||||
import sys
|
||||
import mcrfpy
|
||||
|
||||
print("Testing Frame bounds...")
|
||||
frame = mcrfpy.Frame(pos=(50, 100), size=(200, 150))
|
||||
|
||||
print(f"Frame created: {frame}")
|
||||
|
||||
# Test bounds returns tuple of Vectors
|
||||
bounds = frame.bounds
|
||||
print(f"bounds type: {type(bounds)}")
|
||||
print(f"bounds value: {bounds}")
|
||||
|
||||
if not isinstance(bounds, tuple):
|
||||
print(f"FAIL: bounds should be tuple, got {type(bounds)}")
|
||||
sys.exit(1)
|
||||
|
||||
if len(bounds) != 2:
|
||||
print(f"FAIL: bounds should have 2 elements, got {len(bounds)}")
|
||||
sys.exit(1)
|
||||
|
||||
pos, size = bounds
|
||||
print(f"pos type: {type(pos)}, value: {pos}")
|
||||
print(f"size type: {type(size)}, value: {size}")
|
||||
|
||||
if not hasattr(pos, 'x'):
|
||||
print(f"FAIL: pos should be Vector (has no .x), got {type(pos)}")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"pos.x={pos.x}, pos.y={pos.y}")
|
||||
print(f"size.x={size.x}, size.y={size.y}")
|
||||
|
||||
# Test get_bounds() method is removed (#185)
|
||||
if hasattr(frame, 'get_bounds'):
|
||||
print("FAIL: get_bounds() method should be removed")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("PASS: get_bounds() method is removed")
|
||||
|
||||
print("PASS: Frame bounds test passed!")
|
||||
sys.exit(0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue