Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')... Found 182 test(s). Operations to perform: Synchronize unmigrated apps: messages Apply all migrations: admin, auth, contenttypes, django_cronjob_utils, sessions, tests Synchronizing apps without migrations: Creating tables... Running deferred SQL... Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying django_cronjob_utils.0001_initial... OK Applying django_cronjob_utils.0002_rename_cron_execut_task_c_0a1b2c_idx_cron_execut_task_co_0c575d_idx_and_more... OK Applying sessions.0001_initial... OK Applying tests.0001_initial...test_create_execution_record (tests.test_base.CronTaskBaseTests.test_create_execution_record) Test creating execution record. ... ok test_execute_dict_return (tests.test_base.CronTaskBaseTests.test_execute_dict_return) Test execute with dict return value. ... ok test_execute_exception_handling (tests.test_base.CronTaskBaseTests.test_execute_exception_handling) Test execute exception handling. ... Task exception-task execution failed: Test exception Traceback (most recent call last): File "/home/cursorai/projects/django-cronjob-utils/src/django_cronjob_utils/base.py", line 153, in _execute result = self.execute(self.execution_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/django-cronjob-utils/tests/test_base.py", line 41, in execute raise ValueError("Test exception") ValueError: Test exception ok test_execute_execution_result_return (tests.test_base.CronTaskBaseTests.test_execute_execution_result_return) Test execute with ExecutionResult return value. ... ok test_execute_with_timeout_no_timeout (tests.test_base.CronTaskBaseTests.test_execute_with_timeout_no_timeout) Test execute_with_timeout without timeout. ... ok test_execute_with_timeout_with_timeout (tests.test_base.CronTaskBaseTests.test_execute_with_timeout_with_timeout) Test execute_with_timeout with timeout. ... ok test_execution_result_creation (tests.test_base.CronTaskBaseTests.test_execution_result_creation) Test ExecutionResult creation. ... ok test_execution_result_defaults (tests.test_base.CronTaskBaseTests.test_execution_result_defaults) Test ExecutionResult default values. ... ok test_get_error_code (tests.test_base.CronTaskBaseTests.test_get_error_code) Test get_error_code method. ... ok test_notify_failure (tests.test_base.CronTaskBaseTests.test_notify_failure) Test notify_failure method. ... ok test_run_concurrent_execution_error (tests.test_base.CronTaskBaseTests.test_run_concurrent_execution_error) Test run method with concurrent execution error. ... ok test_run_exception_handling (tests.test_base.CronTaskBaseTests.test_run_exception_handling) Test run method exception handling. ... Task exception-task execution failed: Test exception Traceback (most recent call last): File "/home/cursorai/projects/django-cronjob-utils/src/django_cronjob_utils/base.py", line 153, in _execute result = self.execute(self.execution_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/django-cronjob-utils/tests/test_base.py", line 41, in execute raise ValueError("Test exception") ValueError: Test exception ok test_run_failed_execution (tests.test_base.CronTaskBaseTests.test_run_failed_execution) Test run method with failed execution. ... ok test_run_skipped_execution (tests.test_base.CronTaskBaseTests.test_run_skipped_execution) Test run method when execution is skipped. ... ok test_run_successful_execution (tests.test_base.CronTaskBaseTests.test_run_successful_execution) Test run method with successful execution. ... ok test_run_with_retry_on_failure (tests.test_base.CronTaskBaseTests.test_run_with_retry_on_failure) Test run method with retry on failure enabled. ... ok test_run_with_timeout (tests.test_base.CronTaskBaseTests.test_run_with_timeout) Test run method with timeout. ... Task test-task execution failed: Task execution exceeded timeout of 1 seconds Traceback (most recent call last): File "/home/cursorai/projects/django-cronjob-utils/src/django_cronjob_utils/base.py", line 153, in _execute result = self.execute(self.execution_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/django-cronjob-utils/tests/test_base.py", line 424, in slow_execute time.sleep(2) File "/home/cursorai/projects/django-cronjob-utils/src/django_cronjob_utils/base.py", line 135, in timeout_handler raise TimeoutError(f"Task execution exceeded timeout of {self.timeout} seconds") TimeoutError: Task execution exceeded timeout of 1 seconds ok test_schedule_retry (tests.test_base.CronTaskBaseTests.test_schedule_retry) Test schedule_retry method. ... ok test_should_retry_max_retries_reached (tests.test_base.CronTaskBaseTests.test_should_retry_max_retries_reached) Test should_retry when max retries reached. ... ok test_should_retry_no_execution_record (tests.test_base.CronTaskBaseTests.test_should_retry_no_execution_record) Test should_retry when no execution record exists. ... ok test_should_retry_no_retry_enabled (tests.test_base.CronTaskBaseTests.test_should_retry_no_retry_enabled) Test should_retry when retry is disabled. ... ok test_should_retry_within_limit (tests.test_base.CronTaskBaseTests.test_should_retry_within_limit) Test should_retry when within retry limit. ... ok test_should_run_always_pattern (tests.test_base.CronTaskBaseTests.test_should_run_always_pattern) Test should_run with ALWAYS pattern. ... ok test_should_run_force_option (tests.test_base.CronTaskBaseTests.test_should_run_force_option) Test should_run with force option. ... ok test_should_run_rate_limited_pattern (tests.test_base.CronTaskBaseTests.test_should_run_rate_limited_pattern) Test should_run with RATE_LIMITED pattern. ... ok test_should_run_rerun_on_failure_no_previous (tests.test_base.CronTaskBaseTests.test_should_run_rerun_on_failure_no_previous) Test should_run with RERUN_ON_FAILURE pattern when no previous execution. ... ok test_should_run_rerun_on_failure_previous_failure (tests.test_base.CronTaskBaseTests.test_should_run_rerun_on_failure_previous_failure) Test should_run with RERUN_ON_FAILURE pattern when previous failed. ... ok test_should_run_rerun_on_failure_previous_success (tests.test_base.CronTaskBaseTests.test_should_run_rerun_on_failure_previous_success) Test should_run with RERUN_ON_FAILURE pattern when previous succeeded. ... ok test_should_run_rerun_option (tests.test_base.CronTaskBaseTests.test_should_run_rerun_option) Test should_run with rerun option. ... ok test_should_run_standard_pattern_already_executed (tests.test_base.CronTaskBaseTests.test_should_run_standard_pattern_already_executed) Test should_run with STANDARD pattern when already executed. ... ok test_should_run_standard_pattern_not_executed (tests.test_base.CronTaskBaseTests.test_should_run_standard_pattern_not_executed) Test should_run with STANDARD pattern when not executed. ... ok test_task_initialization (tests.test_base.CronTaskBaseTests.test_task_initialization) Test task initialization. ... ok test_task_initialization_with_options (tests.test_base.CronTaskBaseTests.test_task_initialization_with_options) Test task initialization with options. ... ok test_validate_invalid_date (tests.test_base.CronTaskBaseTests.test_validate_invalid_date) Test validation with invalid date type. ... ok test_validate_success (tests.test_base.CronTaskBaseTests.test_validate_success) Test validation with valid date. ... ok test_register_task_all_patterns (tests.test_decorators.DecoratorTests.test_register_task_all_patterns) Test decorator with all execution patterns. ... ok test_register_task_class_inheritance (tests.test_decorators.DecoratorTests.test_register_task_class_inheritance) Test decorator works with class inheritance. ... ok test_register_task_decorator (tests.test_decorators.DecoratorTests.test_register_task_decorator) Test @register_task decorator. ... ok test_register_task_decorator_preserves_class (tests.test_decorators.DecoratorTests.test_register_task_decorator_preserves_class) Test decorator preserves class functionality. ... ok test_register_task_default_config (tests.test_decorators.DecoratorTests.test_register_task_default_config) Test decorator applies default configuration. ... ok test_register_task_duplicate_code (tests.test_decorators.DecoratorTests.test_register_task_duplicate_code) Test decorator raises error on duplicate code. ... ok test_register_task_duplicate_name (tests.test_decorators.DecoratorTests.test_register_task_duplicate_name) Test decorator raises error on duplicate name. ... ok test_register_task_multiple_tasks (tests.test_decorators.DecoratorTests.test_register_task_multiple_tasks) Test registering multiple tasks with decorator. ... ok test_register_task_partial_config (tests.test_decorators.DecoratorTests.test_register_task_partial_config) Test decorator with partial configuration. ... ok test_register_task_retry_config (tests.test_decorators.DecoratorTests.test_register_task_retry_config) Test decorator with retry configuration. ... ok test_register_task_timeout_config (tests.test_decorators.DecoratorTests.test_register_task_timeout_config) Test decorator with timeout configuration. ... ok test_register_task_with_config (tests.test_decorators.DecoratorTests.test_register_task_with_config) Test @register_task with configuration. ... ok test_concurrent_execution_error (tests.test_exceptions.ConcurrentExecutionErrorTests.test_concurrent_execution_error) Test ConcurrentExecutionError with message. ... ok test_concurrent_execution_error_detailed_message (tests.test_exceptions.ConcurrentExecutionErrorTests.test_concurrent_execution_error_detailed_message) Test ConcurrentExecutionError with detailed message. ... ok test_concurrent_execution_error_inheritance (tests.test_exceptions.ConcurrentExecutionErrorTests.test_concurrent_execution_error_inheritance) Test ConcurrentExecutionError inherits from CronJobError. ... ok test_cron_job_error (tests.test_exceptions.CronJobErrorTests.test_cron_job_error) Test CronJobError can be raised. ... ok test_cron_job_error_inheritance (tests.test_exceptions.CronJobErrorTests.test_cron_job_error_inheritance) Test CronJobError is an Exception. ... ok test_cron_job_error_no_message (tests.test_exceptions.CronJobErrorTests.test_cron_job_error_no_message) Test CronJobError without message. ... ok test_task_not_found_error (tests.test_exceptions.TaskNotFoundErrorTests.test_task_not_found_error) Test TaskNotFoundError with message. ... ok test_task_not_found_error_empty_message (tests.test_exceptions.TaskNotFoundErrorTests.test_task_not_found_error_empty_message) Test TaskNotFoundError with empty message. ... ok test_task_not_found_error_inheritance (tests.test_exceptions.TaskNotFoundErrorTests.test_task_not_found_error_inheritance) Test TaskNotFoundError inherits from CronJobError. ... ok test_validation_error (tests.test_exceptions.ValidationErrorTests.test_validation_error) Test ValidationError with message. ... ok test_validation_error_field_specific (tests.test_exceptions.ValidationErrorTests.test_validation_error_field_specific) Test ValidationError with field-specific message. ... ok test_validation_error_inheritance (tests.test_exceptions.ValidationErrorTests.test_validation_error_inheritance) Test ValidationError inherits from CronJobError. ... ok test_context_creation_minimal (tests.test_hooks.HookContextCreationTests.test_context_creation_minimal) Test creating context with minimal required fields. ... ok test_context_creation_with_all_fields (tests.test_hooks.HookContextCreationTests.test_context_creation_with_all_fields) Test creating context with all fields. ... ok test_context_is_frozen (tests.test_hooks.HookContextCreationTests.test_context_is_frozen) Test that context is immutable (frozen dataclass). ... ok test_context_metadata_is_mutable (tests.test_hooks.HookContextCreationTests.test_context_metadata_is_mutable) Test that metadata dict is mutable for hook communication. ... ok test_hook_with_empty_task_code (tests.test_hooks.HookEdgeCaseTests.test_hook_with_empty_task_code) Test hook with task that has empty code. ... ok test_pre_hook_modifies_metadata (tests.test_hooks.HookEdgeCaseTests.test_pre_hook_modifies_metadata) Test PRE hook can modify metadata for POST hooks. ... ok test_pre_hook_rejection_with_extra_details (tests.test_hooks.HookEdgeCaseTests.test_pre_hook_rejection_with_extra_details) Test PRE hook rejection with extra details. ... Task test-task rejected by PRE hook: WITH_DETAILS - Rejected with details ok test_pre_hook_rejection_with_minimal_info (tests.test_hooks.HookEdgeCaseTests.test_pre_hook_rejection_with_minimal_info) Test PRE hook rejection with minimal error info. ... Task test-task rejected by PRE hook: MINIMAL - ok test_task_with_exception_still_calls_post_hooks (tests.test_hooks.HookEdgeCaseTests.test_task_with_exception_still_calls_post_hooks) Test POST hooks behavior when task raises exception. ... Task exception-task execution failed: Test exception Traceback (most recent call last): File "/home/cursorai/projects/django-cronjob-utils/src/django_cronjob_utils/base.py", line 153, in _execute result = self.execute(self.execution_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/django-cronjob-utils/tests/test_hooks.py", line 64, in execute raise ValueError("Test exception") ValueError: Test exception