Fix test counters in test_app.py

This commit is contained in:
2026-03-27 08:58:40 -07:00
parent 4c050c5a0b
commit fb0b50fcd3

View File

@@ -136,6 +136,7 @@ def test_with_real_ora():
if __name__ == '__main__':
tests = [
test_index,
test_api_open_missing_path,
test_api_save_missing_ora,
test_api_layer_operations,
@@ -145,25 +146,11 @@ if __name__ == '__main__':
test_with_real_ora,
]
passed = 0
failed = 0
# Skip test_index since there's no template yet
print("Skipping test_index (no template yet)")
for test in tests[1:]: # Skip test_index
for test in tests:
try:
if test():
passed += 1
else:
failed += 1
test()
except Exception as e:
print(f"{test.__name__} failed with exception: {e}")
import traceback
traceback.print_exc()
failed += 1
print(f"\n{passed}/{len(tests)-1} tests passed")
if failed > 0:
sys.exit(1)
sys.exit(1)