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 2020/10/18 23:58:23 UTC

[GitHub] [airflow] kaxil opened a new pull request #11643: Use unittest.mock instead of backported mock library

kaxil opened a new pull request #11643:
URL: https://github.com/apache/airflow/pull/11643


   mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards.
   
   https://docs.python.org/3/library/unittest.mock.html
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #11643: Use unittest.mock instead of backported mock library

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #11643:
URL: https://github.com/apache/airflow/pull/11643#issuecomment-711457408


   [The Workflow run](https://github.com/apache/airflow/actions/runs/314474043) is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #11643: Use unittest.mock instead of backported mock library

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11643:
URL: https://github.com/apache/airflow/pull/11643#issuecomment-714431213


   > ```
   > >       assert 'pidfile' in mock_celery_worker.call_args.kwargs
   > E       AssertionError: assert 'pidfile' in kwargs
   > E        +  where kwargs = call(autoscale=None, concurrency=16, hostname=None, loglevel='INFO', optimization='fair', pidfile='test_pid_file', pool='prefork', queues='default').kwargs
   > E        +    where call(autoscale=None, concurrency=16, hostname=None, loglevel='INFO', optimization='fair', pidfile='test_pid_file', pool='prefork', queues='default') = <MagicMock name='Worker' id='140524089964136'>.call_args
   > ```
   > 
   > Looks like a slight API change in mock vs unittest.mock that we'll need to fix in our tests.
   
   Updated


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] ashb commented on pull request #11643: Use unittest.mock instead of backported mock library

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #11643:
URL: https://github.com/apache/airflow/pull/11643#issuecomment-711838466


   ```
   >       assert 'pidfile' in mock_celery_worker.call_args.kwargs
   E       AssertionError: assert 'pidfile' in kwargs
   E        +  where kwargs = call(autoscale=None, concurrency=16, hostname=None, loglevel='INFO', optimization='fair', pidfile='test_pid_file', pool='prefork', queues='default').kwargs
   E        +    where call(autoscale=None, concurrency=16, hostname=None, loglevel='INFO', optimization='fair', pidfile='test_pid_file', pool='prefork', queues='default') = <MagicMock name='Worker' id='140524089964136'>.call_args
   ```
   
   Looks like a slight API change in mock vs unittest.mock that we'll need to fix in our tests.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil merged pull request #11643: Use unittest.mock instead of backported mock library

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #11643:
URL: https://github.com/apache/airflow/pull/11643


   


----------------------------------------------------------------
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:
users@infra.apache.org