Skip to content

Suppress error if no tests collected in pydantic special Tests - #38470

Merged
potiuk merged 3 commits into
mainfrom
suppress-no-tests-collected
Mar 26, 2024
Merged

potiuk merged 3 commits into
mainfrom
suppress-no-tests-collected

Conversation

@Taragolis

@Taragolis Taragolis commented Mar 25, 2024 •

Copy link
Copy Markdown
Contributor

#38402 (comment)

Without changes

❯ breeze testing db-tests --pydantic none --parallelism 2 --parallel-test-types "Always Providers[weaviate]"

...

airflow-test-providers_weaviate_default
airflow-test-always_default

Completed 2 out of 2 (100%).


OK  for Test: Always.
NOK for Test: Providers[weaviate]: Return code: 5.

Always OK
Providers[weaviate]

With changes (without pydantic)

❯ breeze testing db-tests --pydantic none --parallelism 2 --parallel-test-types "Always Providers[weaviate]"

...
Extra pytest args: ('--suppress-no-test-exit-code',)
...

────────────────────────────────────────
Progress: Always                        tests/always/test_connection.py ssssssssssssssssssssssssssssssssssssssss [ 18%]
Progress: Providers[weaviate]           ============================== 2 skipped in 0.93s ==============================
───────────────────────────────────────────────────────────────────────────────────────── Time passed: 00:00:42 ──────────────────────────────────────────────────────────────────────────────────────────
airflow-test-always_default

Completed 2 out of 2 (100%).


OK  for Test: Always.
OK  for Test: Providers[weaviate].

Always OK
Providers[weaviate] OK

Tests Always Providers[weaviate] completed successfully

With changes (with pydantic v2)

❯ breeze testing db-tests --parallelism 2 --parallel-test-types "Always Providers[weaviate]"

...
Extra pytest args: ()
...
Completed 2 out of 2 (100%).


OK  for Test: Always.
OK  for Test: Providers[weaviate].

Always OK
Providers[weaviate] OK

Tests Always Providers[weaviate] completed successfully

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@syedahsn syedahsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@potiuk

potiuk commented Mar 25, 2024

Copy link
Copy Markdown
Member

There is a small risk that it will hide problems if for some reason we break test collection

Comment thread dev/breeze/src/airflow_breeze/utils/run_tests.py Outdated
@Taragolis Taragolis changed the title Suppress error if no tests collected Suppress error if no tests collected in pydantic special Tests Mar 25, 2024
Comment thread dev/breeze/src/airflow_breeze/commands/testing_commands.py Outdated
@eladkal eladkal added this to the Airflow 2.9.0 milestone Mar 26, 2024
@eladkal eladkal added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 26, 2024
@potiuk
potiuk merged commit 24995e8 into main Mar 26, 2024
@Taragolis
Taragolis deleted the suppress-no-tests-collected branch April 2, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants