Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Tests: make 8 files' run/run_test harness re-raise under pytest (they were swallowing failures)
Murtaza Nasir31f55dcdd108
diff --git a/tests/test_admin_hotwords_and_bugfixes.py b/tests/test_admin_hotwords_and_bugfixes.pyindex 05a47c93..1b2fffce 100644--- a/tests/test_admin_hotwords_and_bugfixes.py+++ b/tests/test_admin_hotwords_and_bugfixes.py@@ -36,10 +36,14 @@ def run_test(name, func):print(f" ✗ {name}: {e}")FAILED += 1ERRORS.append((name, str(e)))+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1ERRORS.append((name, f"Exception: {e}"))+ if "pytest" in sys.modules:+ raise# =============================================================================diff --git a/tests/test_api_v1_parity.py b/tests/test_api_v1_parity.pyindex 47edb251..5b8049e8 100644--- a/tests/test_api_v1_parity.py+++ b/tests/test_api_v1_parity.py@@ -32,9 +32,13 @@ def run(name, func):except AssertionError as e:print(f" ✗ {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raisedef setup_user_and_recording():diff --git a/tests/test_connector_architecture.py b/tests/test_connector_architecture.pyindex af858baf..e12f6c49 100644--- a/tests/test_connector_architecture.py+++ b/tests/test_connector_architecture.py@@ -39,10 +39,14 @@ def run_test(name, func):print(f" ✗ {name}: {e}")FAILED += 1ERRORS.append((name, str(e)))+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1ERRORS.append((name, f"Exception: {e}"))+ if "pytest" in sys.modules:+ raisedef clear_env():diff --git a/tests/test_embedding_api_mode.py b/tests/test_embedding_api_mode.pyindex 97fcd929..253c5ecf 100644--- a/tests/test_embedding_api_mode.py+++ b/tests/test_embedding_api_mode.py@@ -35,9 +35,13 @@ def run(name, func):except AssertionError as e:print(f" ✗ {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raisedef reload_with_env(**env):diff --git a/tests/test_embedding_identifier_compat.py b/tests/test_embedding_identifier_compat.pyindex df92e6b1..b5cce4bf 100644--- a/tests/test_embedding_identifier_compat.py+++ b/tests/test_embedding_identifier_compat.py@@ -39,9 +39,13 @@ def run(name, func):except AssertionError as e:print(f" FAIL {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" FAIL {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raisedef reset_settings(stored_identifier=None, legacy_model_name=None):diff --git a/tests/test_reprocess_hotwords.py b/tests/test_reprocess_hotwords.pyindex 93561f42..6260bf81 100644--- a/tests/test_reprocess_hotwords.py+++ b/tests/test_reprocess_hotwords.py@@ -42,9 +42,13 @@ def run(name, func):except AssertionError as e:print(f" ✗ {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raisedef setup_recording(*, owner_hotwords=None, owner_prompt=None,diff --git a/tests/test_title_truncation.py b/tests/test_title_truncation.pyindex d585324a..d79a7a62 100644--- a/tests/test_title_truncation.py+++ b/tests/test_title_truncation.py@@ -39,9 +39,13 @@ def run(name, func):except AssertionError as e:print(f" ✗ {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raisedef make_cyrillic_transcript():diff --git a/tests/test_transcription_model_override.py b/tests/test_transcription_model_override.pyindex 3a9a2bd3..5dd145e0 100644--- a/tests/test_transcription_model_override.py+++ b/tests/test_transcription_model_override.py@@ -50,9 +50,13 @@ def run(name, func):except AssertionError as e:print(f" ✗ {name}: {e}")FAILED += 1+ if "pytest" in sys.modules:+ raiseexcept Exception as e:print(f" ✗ {name}: EXCEPTION - {e}")FAILED += 1+ if "pytest" in sys.modules:+ raise# -----------------------------------------------------------------------------