Commit 7fedd44
authored
[release/2.6] Suppress Python UserWarnings to fix compiler logs test (#2577)
PR to fix
- dynamo/test_logging.py::LoggingTests::test_logs_out
Test compares a console log with the dynamo output log file.
It failed due to unrelated python UserWarning messages in the console
log:
```
/opt/conda/envs/py_3.10/lib/python3.10/site-packages/redis/connection.py:77: UserWarning: redis-py works best with hiredis. Please consider installing
warnings.warn(msg)
/opt/conda/envs/py_3.10/lib/python3.10/site-packages/z3/z3core.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
```
This PR adds the environment variable `PYTHONWARNINGS="ignore"` when starting the test subprocess to suppress UserWarnings in the output
Fixes SWDEV-5264751 parent fba9564 commit 7fedd44
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| 799 | + | |
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| |||
0 commit comments