Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented May 28, 2024

Some of the provider tests fail to be collected by Pytest if they are run on older airlfow releases - because of problematic imports or runtime errors returned by provider initialization code.

This PR adds test_utils compatibility context manager to allow to handle it in the way that the tests are automatically skipped in such cases.


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

Some of the provider tests fail to be collected by Pytest if they are
run on older airlfow releases - because of problematic imports or
runtime errors returned by provider initialization code.

This PR adds test_utils compatibility context manager to allow to handle
it in the way that the tests are automatically skipped in such cases.
@potiuk
Copy link
Member Author

potiuk commented May 28, 2024

Extracted from #39862 and follow-up after 339883 -> allows to work very efficiently with provider tests during local test running - all tests should be collectable - regardless of airflow version we run them with.

@potiuk potiuk requested a review from hussein-awala May 28, 2024 09:24
@potiuk potiuk merged commit dad3c59 into apache:main May 28, 2024
@potiuk potiuk deleted the alllow-test-collection-for-fab-common-io-on-older-airflow branch May 28, 2024 14:19
@utkarsharma2 utkarsharma2 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 3, 2024
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
…ng (apache#39888)

Some of the provider tests fail to be collected by Pytest if they are
run on older airlfow releases - because of problematic imports or
runtime errors returned by provider initialization code.

This PR adds test_utils compatibility context manager to allow to handle
it in the way that the tests are automatically skipped in such cases.
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
…ng (apache#39888)

Some of the provider tests fail to be collected by Pytest if they are
run on older airlfow releases - because of problematic imports or
runtime errors returned by provider initialization code.

This PR adds test_utils compatibility context manager to allow to handle
it in the way that the tests are automatically skipped in such cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:amazon AWS/Amazon - related issues provider:fab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants