Fix remaining PT012
pytest checks: pytest-raises-with-multiple-statements
#38270
Closed
73 tasks done
Labels
Body
Follow-up task for #38219
We enable this rule for avoid accidentally misses some asserts into the
pytest.raises()
blocksEasy way to find all linting problem into the module
pyproject.toml
in [tool.ruff.lint.per-file-ignores]Tip
Feel free to ask a suggestion/helps in slack channels
#contributors
or#new-contributors
Note
There is no problem to mark specific case which cannot be easily resolved by add
# noqa: PT012 reason why it should be skiped from check
Warning
There is a chance to found a regression into the Providers Code Base, so better fix it separately of other changes. E.g fix regression in code base and adopt the test by the separate PR
Regular Unit Tests
Provider amazon
tests/providers/amazon/aws/hooks/test_base_aws.py
tests/providers/amazon/aws/hooks/test_datasync.py
tests/providers/amazon/aws/hooks/test_eks.py
tests/providers/amazon/aws/hooks/test_redshift_data.py
tests/providers/amazon/aws/hooks/test_s3.py
tests/providers/amazon/aws/operators/test_emr_serverless.py
tests/providers/amazon/aws/operators/test_redshift_data.py
tests/providers/amazon/aws/sensors/test_glacier.py
tests/providers/amazon/aws/sensors/test_glue.py
tests/providers/amazon/aws/sensors/test_lambda_function.py
tests/providers/amazon/aws/system/utils/test_helpers.py
tests/providers/amazon/aws/transfers/test_redshift_to_s3.py
tests/providers/amazon/aws/triggers/test_ecs.py
tests/providers/amazon/aws/waiters/test_neptune.py
Provider apache.beam
tests/providers/apache/beam/hooks/test_beam.py
Provider apache.hive
tests/providers/apache/hive/hooks/test_hive.py
tests/providers/apache/hive/sensors/test_named_hive_partition.py
Provider apache.spark
tests/providers/apache/spark/hooks/test_spark_sql.py
Provider celery
tests/providers/celery/sensors/test_celery_queue.py
Provider cncf.kubernetes
tests/providers/cncf/kubernetes/executors/test_kubernetes_executor.py
tests/providers/cncf/kubernetes/hooks/test_kubernetes.py
tests/providers/cncf/kubernetes/operators/test_pod.py
tests/providers/cncf/kubernetes/utils/test_k8s_resource_iterator.py
tests/providers/cncf/kubernetes/utils/test_pod_manager.py
Provider common.sql
tests/providers/common/sql/operators/test_sql.py
Provider databricks
tests/providers/databricks/hooks/test_databricks.py
tests/providers/databricks/operators/test_databricks.py
tests/providers/databricks/operators/test_databricks_repos.py
tests/providers/databricks/sensors/test_databricks_partition.py
Provider datadog
tests/providers/datadog/sensors/test_datadog.py
Provider dbt
tests/providers/dbt/cloud/operators/test_dbt.py
Provider fab
tests/providers/fab/auth_manager/cli_commands/test_user_command.py
Provider ftp
tests/providers/ftp/operators/test_ftp.py
Provider google
tests/providers/google/cloud/hooks/test_bigquery.py
tests/providers/google/cloud/hooks/test_cloud_storage_transfer_service.py
tests/providers/google/cloud/hooks/test_dataflow.py
tests/providers/google/cloud/hooks/test_dataprep.py
tests/providers/google/cloud/hooks/test_kubernetes_engine.py
tests/providers/google/cloud/hooks/test_pubsub.py
tests/providers/google/cloud/operators/test_bigtable.py
tests/providers/google/cloud/operators/test_cloud_sql.py
tests/providers/google/cloud/operators/test_cloud_storage_transfer_service.py
tests/providers/google/cloud/operators/test_compute.py
tests/providers/google/cloud/operators/test_datafusion.py
tests/providers/google/cloud/operators/test_dataproc.py
tests/providers/google/cloud/operators/test_functions.py
tests/providers/google/cloud/operators/test_kubernetes_engine.py
tests/providers/google/cloud/operators/test_mlengine.py
tests/providers/google/cloud/operators/test_spanner.py
tests/providers/google/cloud/sensors/test_datafusion.py
tests/providers/google/cloud/sensors/test_dataproc.py
tests/providers/google/cloud/sensors/test_gcs.py
tests/providers/google/cloud/sensors/test_pubsub.py
tests/providers/google/cloud/transfers/test_gcs_to_bigquery.py
tests/providers/google/cloud/utils/test_credentials_provider.py
tests/providers/google/common/hooks/test_base_google.py
Provider jenkins
tests/providers/jenkins/sensors/test_jenkins.py
Provider microsoft.azure
tests/providers/microsoft/azure/hooks/test_data_factory.py
tests/providers/microsoft/azure/hooks/test_wasb.py
Provider microsoft.psrp
tests/providers/microsoft/psrp/hooks/test_psrp.py
Provider openai
tests/providers/openai/operators/test_openai.py
Provider oracle
tests/providers/oracle/hooks/test_oracle.py
Provider papermill
tests/providers/papermill/operators/test_papermill.py
Provider sftp
tests/providers/sftp/hooks/test_sftp.py
tests/providers/sftp/operators/test_sftp.py
tests/providers/sftp/sensors/test_sftp.py
tests/providers/sftp/triggers/test_sftp.py
Provider ssh
tests/providers/ssh/hooks/test_ssh.py
tests/providers/ssh/operators/test_ssh.py
Provider telegram
tests/providers/telegram/hooks/test_telegram.py
tests/providers/telegram/operators/test_telegram.py
K8S Tests
For more detail have a look Kubernetes tests into the contributors documentation
airflow/pyproject.toml
Line 1406 in 5a612da
kubernetes_tests/test_kubernetes_pod_operator.py
Committer
The text was updated successfully, but these errors were encountered: