You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/02/12 16:25:32 UTC
[airflow] branch main updated: migrated callback tests to pytest (#29373)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 190d481949 migrated callback tests to pytest (#29373)
190d481949 is described below
commit 190d48194977dcfa42640aa7ec0842b5525e15b9
Author: Abhishek-kumar-samsung <12...@users.noreply.github.com>
AuthorDate: Sun Feb 12 21:55:23 2023 +0530
migrated callback tests to pytest (#29373)
* migrated callback tests to pytest
Co-authored-by: eladkal <45...@users.noreply.github.com>
---
tests/callbacks/test_callback_requests.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/callbacks/test_callback_requests.py b/tests/callbacks/test_callback_requests.py
index e97d0fc8ae..14f547c02f 100644
--- a/tests/callbacks/test_callback_requests.py
+++ b/tests/callbacks/test_callback_requests.py
@@ -18,7 +18,7 @@ from __future__ import annotations
from datetime import datetime
-from parameterized import parameterized
+import pytest
from airflow.callbacks.callback_requests import (
CallbackRequest,
@@ -40,7 +40,8 @@ TI = TaskInstance(
class TestCallbackRequest:
- @parameterized.expand(
+ @pytest.mark.parametrize(
+ "input,request_class",
[
(CallbackRequest(full_filepath="filepath", msg="task_failure"), CallbackRequest),
(
@@ -70,7 +71,7 @@ class TestCallbackRequest:
),
SlaCallbackRequest,
),
- ]
+ ],
)
def test_from_json(self, input, request_class):
json_str = input.to_json()