SIENTIAPDE-1241: Suppress PytestUnraisableExceptionWarning and update test data in training repository tests.

This commit is contained in:
Bruno Domingues
2025-10-30 15:22:59 -03:00
parent bb25a19d8c
commit 5b14f1016b
3 changed files with 21 additions and 11 deletions

View File

@@ -298,5 +298,10 @@ def test_activities_del_with_engine_exception_caught(
def __del__(self):
raise RuntimeError('Test error')
# Suppress the PytestUnraisableExceptionWarning for this specific test
import warnings
warnings.filterwarnings('ignore', category=pytest.PytestUnraisableExceptionWarning)
with patch('builtins.super', return_value=MockSuperWithError()):
activities.__del__()

View File

@@ -143,6 +143,11 @@ def test_experiment_tracking_del_with_engine_exception(
def __del__(self):
raise RuntimeError('Test error')
# Suppress the PytestUnraisableExceptionWarning for this specific test
import warnings
warnings.filterwarnings('ignore', category=pytest.PytestUnraisableExceptionWarning)
with patch('builtins.super', return_value=MockSuperWithError()):
et.__del__()