Skip to content

Conversation

@Taragolis
Copy link
Contributor

Originally this test raise RemovedInAirflow3Warning which might have a side effect in the other tests which are loaded entire test dag folder, replace it for something which we do not prohibit in our tests.

It also should fix one case (tests/cli/commands/test_dag_command.py::TestCliDags::test_backfill_treat_dag_as_regex_deprecation) in #39450 which started failed due to changes in pytest.warns in 8.0, it now reraise unmatched warnings in the end of context manager

pytest tests/cli/commands/test_dag_command.py::TestCliDags::test_backfill_treat_dag_as_regex_deprecation
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.9.9, pytest-8.2.0, pluggy-1.5.0 -- /home/taragolis/.pyenv/versions/3.9.9/envs/airflow-env/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/taragolis/Projects/common/airflow
configfile: pyproject.toml
plugins: mock-3.12.0, rerunfailures-12.0, anyio-4.0.0, time-machine-2.13.0, asyncio-0.21.1, forked-1.4.0, icdiff-0.8, timeouts-1.2.1, instafail-0.5.0, xdist-3.3.1, cov-4.1.0, requests-mock-1.11.0, httpx-0.21.3
asyncio: mode=strict
setup timeout: 0.0s, execution timeout: 0.0s, teardown timeout: 0.0s
collected 1 item                                                                                                                                                                                                                

tests/cli/commands/test_dag_command.py::TestCliDags::test_backfill_treat_dag_as_regex_deprecation PASSED                                                                                                                  [100%]
============================================================================================= Warning summary. Total: 8, Unique: 2 ==============================================================================================
tests: total 8, unique 2
  runtest: total 8, unique 2
Warnings saved into /home/taragolis/Projects/common/airflow/tests/warnings.txt file.

======================================================================================================= 1 passed in 4.06s =======================================================================================================

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

@Taragolis Taragolis added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label May 7, 2024
@Taragolis Taragolis merged commit 06b3b02 into apache:main May 7, 2024
@Taragolis Taragolis deleted the change-warning-in-warning-capture-dag branch May 7, 2024 12:24
pateash pushed a commit to pateash/airflow that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants