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 2023/01/10 19:48:03 UTC

[GitHub] [airflow] frankcash commented on a diff in pull request #28773: pre-commit check for xfail in unit tests

frankcash commented on code in PR #28773:
URL: https://github.com/apache/airflow/pull/28773#discussion_r1066247422


##########
.pre-commit-config.yaml:
##########
@@ -577,6 +577,14 @@ repos:
         files: \.*example_dags.*\.py$
         exclude: ^airflow/_vendor/
         pass_filenames: true
+      - id: check-xfail-usage-in-test-code
+        language: pygrep
+        name: Don't use xfail in tests
+        description: xfail is not recommended as a test meant to fail is generally not meaningful
+        entry: "@pytest.mark.xfail"
+        pass_filenames: true
+        files: ^tests/.*\.py$
+        exclude: ^airflow/|^docs/|^tests/always/test_project_structure.py|^tests/jobs/test_backfill_job.py

Review Comment:
   good call out, that was just copy pasta from before, will remove it now :) 



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