vincbeck commented on code in PR #38905: URL: https://github.com/apache/airflow/pull/38905#discussion_r1565766792
########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. Review Comment: ```suggestion By default, all warnings captured during the test runs are saved into the ``tests/warnings.txt``. ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. + +If required you could change the path by providing ``--warning-output-path`` in pytest CLI arguments +or by set environment variable ``CAPTURE_WARNINGS_OUTPUT``. + +.. code-block:: console + + root@3f98e75b1ebe:/opt/airflow# pytest tests/core/ --warning-output-path=/foo/bar/spam.egg + ... + ========================= Warning summary. Total: 34, Unique: 16 ========================== + airflow: total 11, unique 1 + other: total 12, unique 4 + tests: total 11, unique 11 + Warnings saved into /foo/bar/spam.egg file. + + ================================= short test summary info ================================= + +You might also disable capture system by provide ``--disable-capture-warnings`` in pytest CLI arguments +or by by set `global warnings filter <https://docs.python.org/3/library/warnings.html#the-warnings-filter>`__ Review Comment: ```suggestion or by setting `global warnings filter <https://docs.python.org/3/library/warnings.html#the-warnings-filter>`__ ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. + +If required you could change the path by providing ``--warning-output-path`` in pytest CLI arguments +or by set environment variable ``CAPTURE_WARNINGS_OUTPUT``. + +.. code-block:: console + + root@3f98e75b1ebe:/opt/airflow# pytest tests/core/ --warning-output-path=/foo/bar/spam.egg + ... + ========================= Warning summary. Total: 34, Unique: 16 ========================== + airflow: total 11, unique 1 + other: total 12, unique 4 + tests: total 11, unique 11 + Warnings saved into /foo/bar/spam.egg file. + + ================================= short test summary info ================================= + +You might also disable capture system by provide ``--disable-capture-warnings`` in pytest CLI arguments +or by by set `global warnings filter <https://docs.python.org/3/library/warnings.html#the-warnings-filter>`__ +to **ignore**, e.g. by set ``PYTHONWARNINGS`` environment variable to ``ignore``. Review Comment: ```suggestion to **ignore**, e.g. set ``PYTHONWARNINGS`` environment variable to ``ignore``. ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. + +If required you could change the path by providing ``--warning-output-path`` in pytest CLI arguments Review Comment: ```suggestion If required, you could change the path by providing ``--warning-output-path`` as pytest CLI arguments ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. + +If required you could change the path by providing ``--warning-output-path`` in pytest CLI arguments +or by set environment variable ``CAPTURE_WARNINGS_OUTPUT``. + +.. code-block:: console + + root@3f98e75b1ebe:/opt/airflow# pytest tests/core/ --warning-output-path=/foo/bar/spam.egg + ... + ========================= Warning summary. Total: 34, Unique: 16 ========================== + airflow: total 11, unique 1 + other: total 12, unique 4 + tests: total 11, unique 11 + Warnings saved into /foo/bar/spam.egg file. + + ================================= short test summary info ================================= + +You might also disable capture system by provide ``--disable-capture-warnings`` in pytest CLI arguments Review Comment: ```suggestion You might also disable capture warnings by providing ``--disable-capture-warnings`` as pytest CLI arguments ``` ########## contributing-docs/testing/unit_tests.rst: ########## @@ -1140,6 +1140,34 @@ for prevent to run on unsupported platform. - ``breeze``: Run test only inside of Breeze container, it might be useful in case of run some potential dangerous things in tests or if it expects to use common Breeze things. +Warnings capture system +....................... + +By default all warnings which captured during tests run saved into the ``tests/warnings.txt``. + +If required you could change the path by providing ``--warning-output-path`` in pytest CLI arguments +or by set environment variable ``CAPTURE_WARNINGS_OUTPUT``. Review Comment: ```suggestion or by setting the environment variable ``CAPTURE_WARNINGS_OUTPUT``. ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
