Andrushika commented on code in PR #75400:
URL: https://github.com/apache/airflow/pull/75400#discussion_r4370451656


##########
airflow-core/tests/unit/dag_processing/test_processor.py:
##########
@@ -426,6 +426,91 @@ def test_import_module_in_bundle_root(self, tmp_path: 
pathlib.Path, inprocess_cl
         assert result.import_errors == {}
         assert result.serialized_dags[0].dag_id == "dag_name"
 
+    @staticmethod
+    def _write_dag_that_kills_itself(folder: pathlib.Path, signal_name: str) 
-> pathlib.Path:
+        path = folder / "dag_that_kills_itself.py"
+        path.write_text(
+            textwrap.dedent(
+                f"""\
+                import os
+                import signal
+
+                from airflow.sdk import DAG
+
+                os.kill(os.getpid(), signal.{signal_name})
+                DAG("never_defined")
+                """
+            )
+        )
+        return path
+
+    def test_parse_killed_by_a_crash_signal_is_an_import_error(
+        self, tmp_path: pathlib.Path, inprocess_client
+    ):
+        path = self._write_dag_that_kills_itself(tmp_path, "SIGSEGV")

Review Comment:
   Added, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to