kenfinster commented on pull request #14588:
URL: https://github.com/apache/airflow/pull/14588#issuecomment-791371973


   @XD-DENG There was a failure with:
   ```
   ________________ TestNoAdditionalArgsInOperatorsRule.test_check 
________________
   
   self = 
<tests.upgrade.rules.test_no_additional_args_operators.TestNoAdditionalArgsInOperatorsRule
 testMethod=test_check>
   
       @pytest.mark.filterwarnings('always')
       def test_check(self):
           rule = NoAdditionalArgsInOperatorsRule()
       
           assert isinstance(rule.title, str)
           assert isinstance(rule.description, str)
       
           with NamedTemporaryFile(mode='w', suffix='.py') as dag_file:
               dag_file.write(
                   textwrap.dedent('''
               from airflow import DAG
               from airflow.utils.dates import days_ago
               from airflow.operators.bash_operator import BashOperator
       
               with DAG(dag_id="test_no_additional_args_operators", 
start_date=days_ago(0)):
                   BashOperator(task_id='test', bash_command="true", 
extra_param=42)
                   '''))
               dag_file.flush()
               msgs = list(rule.check(dags_folder=dag_file.name))
   >           assert len(msgs) == 1
   E           AssertionError: assert 0 == 1
   E            +  where 0 = len([])
   
   tests/upgrade/rules/test_no_additional_args_operators.py:49: AssertionError
   ```
   
   So i change the assertion. Thinking of it again maybe better way is to 
remove this test all together. It tries to mock a dag bag but this PR makes it 
redundant. 


----------------------------------------------------------------
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.

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


Reply via email to