You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vedantlodha (via GitHub)" <gi...@apache.org> on 2023/02/26 09:24:46 UTC

[GitHub] [airflow] vedantlodha opened a new pull request, #29775: Migrate tests in google/cloud/operators from unittest to pytest

vedantlodha opened a new pull request, #29775:
URL: https://github.com/apache/airflow/pull/29775

    Relates: #29305
   
   This change moves the tests in google/cloud/operators provider package from pytest to unittest.
   
   <!--
   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 an 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/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vedantlodha commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "vedantlodha (via GitHub)" <gi...@apache.org>.
vedantlodha commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1446237197

   @potiuk @Taragolis @Abhishek-kumar-samsung 
   Thanks for the reviews! Had missed out a commit with the push and addressed rest of the comments. Please take a look when you have some time.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Abhishek-kumar-samsung commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Abhishek-kumar-samsung (via GitHub)" <gi...@apache.org>.
Abhishek-kumar-samsung commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445331409

   I was also trying similar thing and same issue was coming for me, so i didn't changed operators part.
   
   Can you please check again, as i think you missed this issue while testing locally.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445326772

   Somewhere unitttest is still imported.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis merged pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis merged PR #29775:
URL: https://github.com/apache/airflow/pull/29775


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Abhishek-kumar-samsung commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Abhishek-kumar-samsung (via GitHub)" <gi...@apache.org>.
Abhishek-kumar-samsung commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445330013

   @vedantlodha 
   I am not sure with how checks work and how you tested it locally.
   
   But for me, one of the files `tests/providers/google/cloud/operators/test_bigquery_dts.py` . 
   After doing your changes no test is executed.
   
   Running before your changes
   ![image](https://user-images.githubusercontent.com/120032754/221406283-37391fed-f1a1-4ba1-8371-47e4912977c1.png)
   
   Running after your changes
   ![image](https://user-images.githubusercontent.com/120032754/221406370-79d06bef-6345-45e2-8f36-d574bb1be047.png)
   
   I am not sure with other files.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on a diff in pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on code in PR #29775:
URL: https://github.com/apache/airflow/pull/29775#discussion_r1118115259


##########
tests/providers/google/cloud/operators/test_bigquery_dts.py:
##########
@@ -51,7 +50,7 @@
 )
 
 
-class BigQueryCreateDataTransferOperatorTestCase(unittest.TestCase):
+class BigQueryCreateDataTransferOperatorTestCase:

Review Comment:
   ```suggestion
   class TestBigQueryCreateDataTransferOperator:
   ```



##########
tests/providers/google/cloud/operators/test_bigquery_dts.py:
##########
@@ -78,7 +77,7 @@ def test_execute(self, mock_hook):
         assert "access_key_id" not in return_value.get("params", {})
 
 
-class BigQueryDeleteDataTransferConfigOperatorTestCase(unittest.TestCase):
+class BigQueryDeleteDataTransferConfigOperatorTestCase:

Review Comment:
   ```suggestion
   class TestBigQueryDeleteDataTransferConfigOperator:
   ```



##########
tests/providers/google/cloud/operators/test_bigquery_dts.py:
##########
@@ -94,7 +93,7 @@ def test_execute(self, mock_hook):
         )
 
 
-class BigQueryDataTransferServiceStartTransferRunsOperatorTestCase(unittest.TestCase):
+class BigQueryDataTransferServiceStartTransferRunsOperatorTestCase:

Review Comment:
   ```suggestion
   class TestBigQueryDataTransferServiceStartTransferRunsOperator:
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445402957

   @vedantlodha rename `BigQueryDataTransferServiceStartTransferRunsOperatorTestCase` to `TestBigQueryDataTransferServiceStartTransferRunsOperator`
   
   `pytest` classes should started with `Test...`


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] vedantlodha commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "vedantlodha (via GitHub)" <gi...@apache.org>.
vedantlodha commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445307576

   @Taragolis could you please review this change? 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Abhishek-kumar-samsung commented on pull request #29775: Migrate tests in google/cloud/operators from unittest to pytest

Posted by "Abhishek-kumar-samsung (via GitHub)" <gi...@apache.org>.
Abhishek-kumar-samsung commented on PR #29775:
URL: https://github.com/apache/airflow/pull/29775#issuecomment-1445330525

   This i could predict because i was also trying similar thing, but i got above issue.
   
   I am not sure why above issue was coming.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org