You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/11 13:29:20 UTC

[GitHub] Fokko closed pull request #4472: [AIRFLOW-3664] Fix interpreter errors in test_python_operator.py

Fokko closed pull request #4472: [AIRFLOW-3664] Fix interpreter errors in test_python_operator.py
URL: https://github.com/apache/airflow/pull/4472
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/operators/test_python_operator.py b/tests/operators/test_python_operator.py
index dd830b899c..f54dcf78a2 100644
--- a/tests/operators/test_python_operator.py
+++ b/tests/operators/test_python_operator.py
@@ -225,7 +225,7 @@ def test_without_dag_run(self):
             elif ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.SKIPPED)
             else:
-                raise
+                raise Exception
 
     def test_branch_list_without_dag_run(self):
         """This checks if the BranchPythonOperator supports branching off to a list of tasks."""
@@ -258,7 +258,7 @@ def test_branch_list_without_dag_run(self):
             if ti.task_id in expected:
                 self.assertEquals(ti.state, expected[ti.task_id])
             else:
-                raise
+                raise Exception
 
     def test_with_dag_run(self):
         self.branch_op = BranchPythonOperator(task_id='make_choice',
@@ -287,7 +287,7 @@ def test_with_dag_run(self):
             elif ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.SKIPPED)
             else:
-                raise
+                raise Exception
 
 
 class ShortCircuitOperatorTest(unittest.TestCase):
@@ -345,11 +345,11 @@ def test_without_dag_run(self):
                 self.assertEquals(ti.state, State.SUCCESS)
             elif ti.task_id == 'upstream':
                 # should not exist
-                raise
+                raise Exception
             elif ti.task_id == 'branch_1' or ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.SKIPPED)
             else:
-                raise
+                raise Exception
 
         value = True
         dag.clear()
@@ -360,11 +360,11 @@ def test_without_dag_run(self):
                 self.assertEquals(ti.state, State.SUCCESS)
             elif ti.task_id == 'upstream':
                 # should not exist
-                raise
+                raise Exception
             elif ti.task_id == 'branch_1' or ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.NONE)
             else:
-                raise
+                raise Exception
 
         session.close()
 
@@ -408,7 +408,7 @@ def test_with_dag_run(self):
             elif ti.task_id == 'branch_1' or ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.SKIPPED)
             else:
-                raise
+                raise Exception
 
         value = True
         dag.clear()
@@ -426,4 +426,4 @@ def test_with_dag_run(self):
             elif ti.task_id == 'branch_1' or ti.task_id == 'branch_2':
                 self.assertEquals(ti.state, State.NONE)
             else:
-                raise
+                raise Exception


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services