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__': if __name__ == '__main__':
tests = [ tests = [
test_index,
test_api_open_missing_path, test_api_open_missing_path,
test_api_save_missing_ora, test_api_save_missing_ora,
test_api_layer_operations, test_api_layer_operations,
@@ -145,25 +146,11 @@ if __name__ == '__main__':
test_with_real_ora, test_with_real_ora,
] ]
passed = 0 for test in tests:
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
try: try:
if test(): test()
passed += 1
else:
failed += 1
except Exception as e: except Exception as e:
print(f"{test.__name__} failed with exception: {e}") print(f"{test.__name__} failed with exception: {e}")
import traceback import traceback
traceback.print_exc() traceback.print_exc()
failed += 1 sys.exit(1)
print(f"\n{passed}/{len(tests)-1} tests passed")
if failed > 0:
sys.exit(1)